We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 09a263d commit 2a2c7d3Copy full SHA for 2a2c7d3
.github/workflows/pr-labeller.yaml
@@ -49,8 +49,13 @@ jobs:
49
const labelsToAdd = [...folderLabels];
50
console.log(`Adding the following folder-based labels to the PR: ${labelsToAdd.join(", ")}`);
51
52
- await github.rest.issues.addLabels({
53
- ...context.repo,
54
- issue_number: prNumber,
55
- labels: labelsToAdd,
56
- });
+ try {
+ await github.rest.issues.addLabels({
+ ...context.repo,
+ issue_number: prNumber,
+ 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