Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 13 additions & 4 deletions .github/workflows/src/summarize-checks/summarize-checks.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// @ts-check

/*
Expand Down Expand Up @@ -283,6 +283,13 @@
const targetBranch = context.payload.pull_request?.base?.ref;
core.info(`PR target branch: ${targetBranch}`);

if (!issue_number) {
core.info(
"This summarize-checks was triggered off a workflow that doesn't provide the issue-number artifact, early exiting.",
);
return;
}

await summarizeChecksImpl(
github,
context,
Expand Down Expand Up @@ -319,7 +326,9 @@
event_name,
targetBranch,
) {
core.info(`Handling ${event_name} event for PR #${issue_number} in ${owner}/${repo}.`);
core.info(
`Handling ${event_name} event for PR #${issue_number} in ${owner}/${repo}@${head_sha}.`,
);

// retrieve latest labels state
const labels = await github.paginate(github.rest.issues.listLabelsOnIssue, {
Expand Down Expand Up @@ -347,9 +356,9 @@

core.info(
`Summarize checks label actions against ${owner}/${repo}#${issue_number}: \n` +
`The following labels were present: [${Array.from(labelContext.present).join(", ")}]` +
`Removing labels [${Array.from(labelContext.toRemove).join(", ")}] then \n` +
`Adding labels [${Array.from(labelContext.toAdd).join(", ")}]`,
`The following labels were present: [${Array.from(labelContext.present).join(", ")}] \n` +
`Removing labels: [${Array.from(labelContext.toRemove).join(", ")}] \n` +
`Adding labels: [${Array.from(labelContext.toAdd).join(", ")}]`,
);

// for (const label of labelContext.toRemove) {
Expand Down
Loading