Skip to content

Commit

Permalink
Debug label workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesnetherton committed Jun 4, 2024
1 parent cb45571 commit e4aa199
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .github/workflows/label-issue.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ permissions:

jobs:
label-issue:
if: "github.repository == 'apache/camel-quarkus' &&
if: "github.repository == 'jamesnetherton/camel-quarkus' &&
!contains(github.event.issue.labels.*.name, 'autolabel/ignore') &&
!contains(github.event.issue.labels.*.name, 'build/camel-main') &&
!contains(github.event.issue.labels.*.name, 'build/quarkus-main')"
Expand Down Expand Up @@ -125,6 +125,9 @@ jobs:
.filter(label => label.name.match("^(?!" + prefixRegex + ").*"))
.map(label => label.name)
.forEach(label => labels.add(label));
console.log("==== labels");
console.log(labels);
// If we are not going to be adding any new labels then just exit the script
if (labels.size === issue.labels.length) {
Expand All @@ -147,9 +150,15 @@ jobs:
labelQueryResults = await github.graphql(labelQuery);
console.log("==== labelQueryResults");
console.log(labelQueryResults);
if (labelQueryResults && labelQueryResults.repository.labels) {
const existingLabels = labelQueryResults.repository.labels.nodes.map(node => node.name);
console.log("==== existingLabels");
console.log(existingLabels);
for (let label of labels) {
if (!existingLabels.includes(label)) {
labelColor = 'ededed';
Expand Down

0 comments on commit e4aa199

Please sign in to comment.