Enhance automatic pr preparation#7125
Open
BlackYps wants to merge 5 commits into
Open
Conversation
Contributor
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 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 |
Contributor
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 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 46-52: The workflow always overwrites category.${{
github.event.pull_request.number }}.md by copying template-snippet.md, which can
clobber an author-provided snippet; change the logic around FILE to first check
for file absence and only create/copy when the target does not exist, and when
committing only add that generated filename instead of git add . so you stage
and commit the new FILE (refer to the FILE variable and the cp/sed/git add/git
commit/git push commands) to avoid touching other files in the branch.
- Around line 23-25: Add explicit GITHUB_TOKEN permissions so the
draft-conversion step can run gh pr ready --undo; add a permissions block
granting pull-requests: write (either globally under the workflow root or on the
specific job that runs the draft conversion) and ensure GITHUB_TOKEN is used
there; update the workflow to include permissions: pull-requests: write so the
gh command can undo drafts successfully.
In `@changelog/snippets/category.7125.md`:
- Line 1: The changelog snippet file category.7125.md is still a template;
rename the file to the correct final category name (replace "category" with the
actual category slug for PR 7125) and edit the file contents to remove the
placeholder line "Your explanation here... [Don't forget to change the category
in the filename] (`#7125`)." and replace it with the finalized changelog entry
text for PR 7125 (brief summary, scope, and PR reference). Ensure the new
filename matches the repository's changelog category conventions and the file
body contains the final, publication-ready snippet.
🪄 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
Run ID: 7d577447-937c-408d-9650-9b894e921d3e
📒 Files selected for processing (3)
.github/workflows/pr-preparation.yamlchangelog/snippets/category.7125.mdchangelog/snippets/sections/template-snippet.md
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.
Description of the proposed changes
Add a snippet file automatically. This prevents people from forgetting it and automates the tediousness to grab and insert the correct PR number. The snippet template already uses the new formatting from #7086
Checklist
Summary by CodeRabbit