What changed, and why it matters
This commit changes a GitHub Actions workflow so that an 'API break' label is added when a version-compatibility check fails and removed when it passes. Previously the label was only added and a comment was always posted. There is no security issue visible in this change.
No security action needed; this is a routine CI workflow improvement.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The diff modifies .github/workflows/ci-labeller.yml. It updates the semver-break job to read both the PR number and the check’s exit code from the artifact, then toggles the ‘API break’ label based on the exit code and only posts the ‘API BREAKING CHANGE DETECTED!’ comment when the check actually fails. This is a CI automation improvement with no code-level security implications.
Changed components
.github/workflows/ci-labeller.ymlInspect captured patch +10 / −5
diff --git a/.github/workflows/ci-labeller.yml b/.github/workflows/ci-labeller.yml
index 00f73f82..9cf670a0 100644
--- a/.github/workflows/ci-labeller.yml
+++ b/.github/workflows/ci-labeller.yml
@@ -40,12 +40,17 @@ jobs:
exit_code=$(tail -n1 api-diff)
toggle=$([ "$exit_code" -eq 0 ] && echo "--remove-label" || echo "--add-label")
gh pr edit $issue_number $toggle "API diff"
- # The semver break artifact must have the PR number on the first line.
- - name: "Comment and Label on API break"
+ # The semver break artifact must have the PR number on the first line,
+ # and the exit code of the semver check on the second line.
+ - name: "Toggle API break Label"
if: ${{ hashFiles('semver-break') != '' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
- issue_number=$(cat semver-break)
- gh pr comment $issue_number --body 'API BREAKING CHANGE DETECTED!'
- gh pr edit $issue_number --add-label "API break"
+ issue_number=$(head -n1 semver-break)
+ exit_code=$(tail -n1 semver-break)
+ toggle=$([ "$exit_code" -eq 0 ] && echo "--remove-label" || echo "--add-label")
+ gh pr edit $issue_number $toggle "API break"
+ if [ "$exit_code" -ne 0 ]; then
+ gh pr comment $issue_number --body 'API BREAKING CHANGE DETECTED!'
+ fi
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.