-
Notifications
You must be signed in to change notification settings - Fork 425
Add experimental functionality for labelling PRs by their size #3218
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
8c324fe
Add experimental functionality for labelling PRs by their size
henrymercer 519594f
Update workflow name
henrymercer 08e53be
Update .github/sizeup.yml
henrymercer f2f52d0
Add score for XL
henrymercer c13672e
Bump sizes a bit
henrymercer e9daf5b
Comment version that is pinned
henrymercer File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,55 @@ | ||
| labeling: | ||
| applyCategoryLabels: true | ||
| categoryLabelPrefix: "size/" | ||
|
|
||
| commenting: | ||
| addCommentWhenScoreThresholdHasBeenExceeded: false | ||
|
|
||
| sizeup: | ||
| categories: | ||
| - name: extra small | ||
| lte: 25 | ||
| label: | ||
| name: XS | ||
| description: Should be very easy to review | ||
| color: 3cbf00 | ||
| - name: small | ||
| lte: 100 | ||
| label: | ||
| name: S | ||
| description: Should be easy to review | ||
| color: 5d9801 | ||
| - name: medium | ||
| lte: 250 | ||
| label: | ||
| name: M | ||
| description: Should be of average difficulty to review | ||
| color: 7f7203 | ||
| - name: large | ||
| lte: 500 | ||
| label: | ||
| name: L | ||
| description: May be hard to review | ||
| color: a14c05 | ||
| - name: extra large | ||
| lte: 1000 | ||
| label: | ||
| name: XL | ||
| description: May be very hard to review | ||
| color: c32607 | ||
| - name: extra extra large | ||
| label: | ||
| name: XXL | ||
| description: May be extremely hard to review | ||
| color: e50009 | ||
| ignoredFilePatterns: | ||
| - ".github/workflows/__*" | ||
| - "lib/**/*" | ||
| - "package-lock.json" | ||
| testFilePatterns: | ||
| - "**/*.test.ts" | ||
| scoring: | ||
| # This formula and the aliases below it are written in prefix notation. | ||
| # For an explanation of how this works, please see: | ||
| # https://github.com/lerebear/sizeup-core/blob/main/README.md#prefix-notation | ||
| formula: "- - + additions deletions comments whitespace" |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| name: Label PR with size | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: | ||
| - opened | ||
| - synchronize | ||
| - reopened | ||
| - edited | ||
| - ready_for_review | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| jobs: | ||
| sizeup: | ||
| name: Label PR with size | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - name: Run sizeup | ||
| uses: lerebear/sizeup-action@b7beb3dd273e36039e16e48e7bc690c189e61951 # 0.8.12 | ||
| with: | ||
| token: "${{ secrets.GITHUB_TOKEN }}" | ||
| configuration-file-path: ".github/sizeup.yml" | ||
Oops, something went wrong.
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.
There was a problem hiding this comment.
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?There was a problem hiding this comment.
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_requestandworkflow_dispatch. We could filter out those triggers with an if but I'm not sure of the benefit.