Skip to content

Commit 2a2c7d3

Browse files
Update .github/workflows/pr-labeller.yaml
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 09a263d commit 2a2c7d3

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.github/workflows/pr-labeller.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,13 @@ jobs:
4949
const labelsToAdd = [...folderLabels];
5050
console.log(`Adding the following folder-based labels to the PR: ${labelsToAdd.join(", ")}`);
5151
52-
await github.rest.issues.addLabels({
53-
...context.repo,
54-
issue_number: prNumber,
55-
labels: labelsToAdd,
56-
});
52+
try {
53+
await github.rest.issues.addLabels({
54+
...context.repo,
55+
issue_number: prNumber,
56+
labels: labelsToAdd,
57+
});
58+
} catch (error) {
59+
console.error(`Failed to add labels to PR #${prNumber}:`, error);
60+
throw error; // Rethrow the error to ensure the workflow fails if this is critical
61+
}

0 commit comments

Comments
 (0)