Skip to content

Add PR size labeling workflow#4

Open
dheerajodha wants to merge 1 commit into
conforma:mainfrom
dheerajodha:add-pr-size-wf
Open

Add PR size labeling workflow#4
dheerajodha wants to merge 1 commit into
conforma:mainfrom
dheerajodha:add-pr-size-wf

Conversation

@dheerajodha

Copy link
Copy Markdown

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.

@coderabbitai

coderabbitai Bot commented Jun 10, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

A 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.

Changes

PR Size Labeling Automation

Layer / File(s) Summary
PR Size Labeling Workflow
.github/workflows/label-pr-size.yaml
Workflow configuration that triggers on pull_request_target events (opened and synchronize), grants pull-requests: write and issues: write permissions, and executes conforma/pr-size-label-action@v1.0.0 to automatically apply size labels to pull requests.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding a PR size labeling workflow, which matches the changeset content.
Description check ✅ Passed The description is directly related to the changeset, explaining the automated workflow for labeling PRs by size and its trigger conditions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0e538d0 and d4a3d57.

📒 Files selected for processing (1)
  • .github/workflows/label-pr-size.yaml

Comment thread .github/workflows/label-pr-size.yaml
Comment thread .github/workflows/label-pr-size.yaml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants