Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnetherton committed Aug 9, 2024
1 parent 063fcdb commit 54c07ca
Showing 1 changed file with 7 additions and 17 deletions.
24 changes: 7 additions & 17 deletions .github/workflows/label-issue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,23 +135,13 @@ jobs:
}
// Check to see if labels already exist, and if not, create them so we can set the color
const labelQuery = `
query($cursor: String) {
repository(owner: "${context.repo.owner}", name: "${context.repo.repo}") {
labels(first: 50, after: $cursor) {
nodes {
name
}
pageInfo {
endCursor
hasNextPage
}
}
}
}
`;
const labelQueryResults = await github.paginate(labelQuery);
const labelQueryResults = await github.paginate(
`GET /repos/${context.repo.owner}/${context.repo.repo}/issues`,
{ owner: context.repo.owner, name: context.repo.repo },
(response) => response.data.map((label) => label.name)
);
console.log(labelQueryResults);
if (labelQueryResults && labelQueryResults.repository.labels) {
const existingLabels = labelQueryResults.repository.labels.nodes.map(node => node.name);
Expand Down

0 comments on commit 54c07ca

Please sign in to comment.