ci: Gate size analysis on ready-to-merge label for PRs#5963
ci: Gate size analysis on ready-to-merge label for PRs#5963
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Semver Impact of This PR⚪ None (no version bump detected) 📋 Changelog PreviewThis is how your changes will appear in the changelog.
🤖 This preview updates automatically when you update the PR. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix prepared a fix for the issue found in the latest run.
- ✅ Fixed: Missing
labeledevent type breaks ready-to-merge gate- Added
types: [opened, synchronize, reopened, labeled]to thepull_requesttrigger insize-analysis.ymlso adding theready-to-mergelabel re-runs the workflow gate.
- Added
Or push these changes by commenting:
@cursor push 4768a9d168
Preview (4768a9d168)
diff --git a/.github/workflows/size-analysis.yml b/.github/workflows/size-analysis.yml
--- a/.github/workflows/size-analysis.yml
+++ b/.github/workflows/size-analysis.yml
@@ -9,6 +9,7 @@
- 'samples/react-native/**'
- '.github/workflows/size-analysis.yml'
pull_request:
+ types: [opened, synchronize, reopened, labeled]
paths:
- 'packages/**'
- 'samples/react-native/**'This Bugbot Autofix run was free. To enable autofix for future PRs, go to the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 6c98311. Configure here.
| RN_SENTRY_POD_NAME: RNSentry | ||
|
|
||
| jobs: | ||
| ready-to-merge-gate: |
There was a problem hiding this comment.
Missing labeled event type breaks ready-to-merge gate
High Severity
The pull_request trigger is missing types: [opened, synchronize, reopened, labeled]. Without the labeled type, adding the ready-to-merge label won't re-trigger the workflow. The gate will fail on initial PR events (no label yet), and the workflow will never re-run when the label is added — effectively blocking size analysis on all PRs. Every other workflow using this gate pattern (native-tests.yml, e2e-v2.yml, sample-application.yml, sample-application-expo.yml) includes the labeled event type.
Additional Locations (1)
Triggered by project rule: PR Review Guidelines for Cursor Bot
Reviewed by Cursor Bugbot for commit 6c98311. Configure here.
| RN_SENTRY_POD_NAME: RNSentry | ||
|
|
||
| jobs: |
There was a problem hiding this comment.
Bug: The size-analysis.yml workflow won't trigger when a label is added to a pull request because the on.pull_request trigger is missing the labeled activity type.
Severity: MEDIUM
Suggested Fix
Add labeled to the list of activity types under the on.pull_request trigger in the .github/workflows/size-analysis.yml file. This will ensure the workflow is triggered when labels are added to pull requests.
Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.
Location: .github/workflows/size-analysis.yml#L26-L28
Potential issue: The `size-analysis.yml` workflow is configured to trigger on pull
requests, but it is missing the `labeled` activity type. As a result, when a label such
as `ready-to-merge` is added to a pull request, the size analysis job will not be
initiated. If this job is a required status check for merging, the pull request will be
blocked from merging because the check will remain in a pending state indefinitely.
Did we get this right? 👍 / 👎 to inform future reviews.
|
@antonis are the comments above relevant? |



📢 Type of change
📜 Description
Adds the
ready-to-mergelabel gate to the Size Analysis workflow, matching the pattern used by other expensive CI workflows (native tests, E2E, sample builds).ready-to-mergelabel is presentmainpushes: jobs run unconditionally (gate passes through)💡 Motivation and Context
The size analysis workflow builds full iOS and Android sample apps, which is expensive. Gating it behind
ready-to-mergesaves CI resources on PRs that aren't ready yet.💚 How did you test it?
Verified the workflow follows the same pattern as
native-tests.yml,e2e-v2.yml,sample-application.yml, andsample-application-expo.yml.📝 Checklist
sendDefaultPIIis enabled🔮 Next steps