Skip to content

Commit

Permalink
fix: graphql fetch tags malformed
Browse files Browse the repository at this point in the history
  • Loading branch information
NGPixel committed Jan 16, 2024
1 parent 82dd4e3 commit 1454181
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,9 @@ async function main () {
// GET LATEST + PREVIOUS TAGS

const tagsRaw = await gh.graphql(`
query lastTags ($owner: String!, $repo: String!) {
query lastTags ($owner: String!, $repo: String!, $first: Int) {
repository (owner: $owner, name: $repo) {
refs(first: maxTagsToFetchSafe, refPrefix: "refs/tags/", orderBy: { field: TAG_COMMIT_DATE, direction: DESC }) {
refs(first: $first, refPrefix: "refs/tags/", orderBy: { field: TAG_COMMIT_DATE, direction: DESC }) {
nodes {
name
target {
Expand All @@ -56,7 +56,8 @@ async function main () {
}
`, {
owner,
repo
repo,
first: maxTagsToFetchSafe
})

const tagsList = _.get(tagsRaw, 'repository.refs.nodes', [])
Expand Down

0 comments on commit 1454181

Please # to comment.