Improve PR prep workflow to create appropriate category snippets - #7194
Improve PR prep workflow to create appropriate category snippets#7194lL1l1 wants to merge 10 commits into
Conversation
|
Warning Review limit reached
Next review available in: 48 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe changelog preparation workflow selects snippet categories and templates from pull request labels, generates category-specific filenames, and substitutes the pull request number. A balance-specific unit template was added, and category documentation was reformatted. ChangesChangelog snippet generation
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant PullRequest
participant PRPreparationWorkflow
participant SnippetTemplate
participant GeneratedSnippet
PullRequest->>PRPreparationWorkflow: provide PR number and labels
PRPreparationWorkflow->>SnippetTemplate: select category template
SnippetTemplate-->>PRPreparationWorkflow: return template content
PRPreparationWorkflow->>GeneratedSnippet: copy template and replace PR_NUMBER
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@BlackYps Could you finish this PR by looking at the labels we use in the repo and seeing if they correlate with snippet categories, then changing the workflow to create the right templates? I added the balance snippet template for the two balance labels. The other snippet categories would use the standard template but just change the file name. I think maybe the balance snippet should not be added for Also I'm not sure how it should generate templates for PRs that cover multiple areas. It could generate all of them, or there could be some kind of priority list. |
|
We have guidelines in the documentation that describe the categories. They also specify a priority when multiple categories would fit. You could just use that. |
I didn't know we documented that there.
From the PRs I've written or labeled the balance label was often accompanying a more technical bug fix or QoL change that inadvertently touched balance and thus should be reviewed by balance members. I guess with this in mind it should be called something like "request balance review" or "notify balance team".
I just thought you'd be the best person for the job because you wrote the workflow and handle the changelog. For example knowing that there is a documented snippet priority is not something I knew. |
except features and performance, no label for those
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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/pr-preparation.yaml:
- Around line 62-76: Update the category-selection logic in the workflow so an
unrecognized or unset flag never produces the undocumented
category.<PR_NUMBER>.md filename. Add an explicit failure with a clear error, or
assign the documented other category as the fallback, while preserving the
existing recognized-flag mappings and templates.
- Around line 52-56: Update the IS_FIX classification in the workflow so a pull
request labeled type: bug is not treated as a fix when it also has area:
documentation or area: tooling. Preserve IS_OTHER and ensure the classification
logic gives these non-game bug labels precedence over the generic bug condition.
- Around line 47-56: Update the IS_BALANCE and IS_OTHER environment expressions
in the workflow to use scalar expression values without the YAML literal block
indicator or embedded outer quotes, so they resolve exactly to true or false
without trailing newlines. Keep the existing label conditions unchanged.
In `@docs/development-changelog.md`:
- Around line 29-35: Polish the category descriptions in the numbered changelog
list: update items 1 and 2 to use “graphics-related” and “AI-related,” and
revise item 7 to include the missing verb so it states that “other” is for
refactors and developer changes.
🪄 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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 38b2b53c-ceae-4d37-b67d-a93072ab8815
📒 Files selected for processing (4)
.github/workflows/pr-preparation.yamlchangelog/snippets/sections/template-snippet-balance.mdchangelog/snippets/sections/template-snippet.mddocs/development-changelog.md
|
We could keep the area:balance label to mark PRs that touch balance, but ignore that label for the snippet category. It seems like a good name after all to mark PRs that the balance team should look at. |
all fix category snippets should be game bug fixes, so need to check that fixes aren't for tooling or docs first
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@docs/development-changelog.md`:
- Around line 32-35: Correct the grammar in changelog category items 4, 6, and
7: change “balance are” to “balance is for,” use “IntelliSense” and “outside the
game” in item 6, and capitalize “Refactors” while separating the clauses
correctly in item 7. Preserve the existing category meanings.
🪄 Autofix
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: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 252bbafb-e109-461d-b791-a6c19156e5db
📒 Files selected for processing (2)
.github/workflows/pr-preparation.yamldocs/development-changelog.md
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/pr-preparation.yaml
|
I think the repository has too many labels already and we should edit the ones we already have. For example |
|
The issue with github labels is that renaming and deleting them would also rename or delete them wherever they were used. This can sometimes be fine, but assigning a new purpose to an existing label will lead to confusing usage on old issues/prs |
|
I agree in principle with bringing it up to the game team, but it's not very important and I already don't get feedback on questions that are much more impactful |
|
For compatibility with old posts we could try archiving the labels. Github doesn't have any feature to do so but we could change the colors and edit the names so that they sort towards the end. We could plan out some action like reviewing the labels and how they're used then deciding on archiving or renaming to conform to a new structure. |
Description of the proposed changes
Create snippets with the correct template and filename based on the PR's labels upon creation.
Testing done on the proposed changes
none
Checklist
Summary by CodeRabbit
New Features
Documentation