Add PR size labeling workflow#4
Open
dheerajodha wants to merge 1 commit into
Open
Conversation
📝 WalkthroughWalkthroughA new GitHub Actions workflow is added to automate PR size labeling. The workflow triggers on pull request open and synchronize events, grants appropriate token permissions, and runs a single job that invokes a PR size labeling action. ChangesPR Size Labeling Automation
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/label-pr-size.yaml:
- Around line 20-25: The workflow uses pull_request_target with broad write
permissions and an unpinned action tag: replace pull_request_target with
pull_request (or justify base-repo context if needed) to avoid exposing
GITHUB_TOKEN to forked PRs and remove or restrict write permissions
(change/remove pull-requests: write and issues: write) to least-privilege;
additionally pin the action conforma/pr-size-label-action@v1.0.0 to a specific
commit SHA (replace the tag with the commit ref) so the action is immutable.
Ensure changes reference the workflow triggers and the action usage
(pull_request_target → pull_request and conforma/pr-size-label-action@<sha>) and
run the workflow locally or in CI to validate.
- Line 32: The workflow uses the GitHub Action reference
"conforma/pr-size-label-action@v1.0.0" which is tag-pinned and can be
retargeted; update that action reference to the full commit SHA instead (for
example replace "`@v1.0.0`" with "@<full-commit-sha>") so the action is pinned
immutably; edit the line containing "conforma/pr-size-label-action@v1.0.0" in
the workflow to use the repository commit SHA of the version you intend to run.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Enterprise
Run ID: b3725efb-3868-40ad-8df1-7c91d0612543
📒 Files selected for processing (1)
.github/workflows/label-pr-size.yaml
st3penta
approved these changes
Jun 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds an automated workflow that labels pull requests based on their size (additions + deletions). The workflow will run on PR creation and updates, ensuring only one size label is present at any time.