Skip to content

Commit

Permalink
add more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
siddharthkp authored Nov 6, 2024
1 parent 8690e88 commit fc89596
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/check-for-integration-result.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ jobs:
};
const { data: currentLabels } = await github.rest.issues.listLabelsOnIssue(issue);
const integrationLabels = currentLabels
const existingIntegrationLabels = currentLabels
.map(label => label.name)
.filter(label => label.startsWith('integration-tests:'));
if (integrationLabels.includes(INTEGRATION_LABEL_NAMES.skipped)) return;
if (existingIntegrationLabels.includes(INTEGRATION_LABEL_NAMES.skipped)) return;
const result = await github.rest.issues.listComments(issue);
const integrationComments = result.data.filter(
Expand All @@ -56,13 +56,13 @@ jobs:
console.log({ pass });
const newIntegrationLabel = pass ? INTEGRATION_LABEL_NAMES.passing : INTEGRATION_LABEL_NAMES.failing;
console.log({newIntegrationLabel})
console.log({existingIntegrationLabels, newIntegrationLabel})
Object.values(INTEGRATION_LABEL_NAMES).map(async (name) => {
if (name === newIntegrationLabel) {
if (integrationLabels.includes(name)); // already added, nothing to do here
if (existingIntegrationLabels.includes(name)); // already added, nothing to do here
else await github.rest.issues.addLabels({...issue, labels: [newIntegrationLabel]});
} else if (integrationLabels.includes(name)) {
} else if (existingIntegrationLabels.includes(name)) {
// remove outdated labels
await github.rest.issues.removeLabel({ ...issue, name });
}
Expand Down

0 comments on commit fc89596

Please sign in to comment.