Skip to content

Conversation

@henrymercer
Copy link
Contributor

Label PRs by their size to give a quick assessment of how difficult they might be to review.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

  • Test only

How did/will you validate this change?

  • None - I am not validating these changes.

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Rollback - Change can only be disabled by rolling back the release or releasing a new version with a fix.

How will you know if something goes wrong after this change is released?

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

@henrymercer henrymercer requested a review from a team as a code owner October 20, 2025 14:11
Copilot AI review requested due to automatic review settings October 20, 2025 14:11
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds experimental functionality for automatically labeling pull requests by their size to help assess review difficulty. The implementation uses the sizeup-action to analyze PR changes and apply size labels (XS, S, M, L, XL, XXL) based on lines of code changed.

  • Introduces a GitHub Actions workflow that triggers on PR events to automatically label PRs
  • Configures six size categories with different thresholds and color-coded labels
  • Excludes generated files and focuses scoring on meaningful code changes

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
.github/workflows/label-pr-size.yml GitHub Actions workflow that runs the sizeup action on PR events
.github/sizeup.yml Configuration file defining size categories, scoring formula, and file exclusions

henrymercer and others added 3 commits October 20, 2025 15:12
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions bot added the size/M Should be of average difficulty to review label Oct 20, 2025
@github-actions github-actions bot added size/S Should be easy to review and removed size/M Should be of average difficulty to review labels Oct 20, 2025
Comment on lines +3 to +10
on:
pull_request:
types:
- opened
- synchronize
- reopened
- edited
- ready_for_review
Copy link
Member

Choose a reason for hiding this comment

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

We have other workflows with these (or mostly these) triggers. Could we add this as a job to e.g. pr-checks.yml?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The PR checks also trigger on pull_request and workflow_dispatch. We could filter out those triggers with an if but I'm not sure of the benefit.

Co-authored-by: Michael B. Gale <mbg@github.com>
@henrymercer henrymercer requested a review from mbg October 20, 2025 16:25
@henrymercer henrymercer enabled auto-merge October 20, 2025 16:27
@henrymercer henrymercer merged commit 6562050 into main Oct 20, 2025
243 checks passed
@henrymercer henrymercer deleted the henrymercer/pr-sizes branch October 20, 2025 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/S Should be easy to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants