Skip to content

Enhance automatic pr preparation#7125

Open
BlackYps wants to merge 5 commits into
developfrom
pr-preparation
Open

Enhance automatic pr preparation#7125
BlackYps wants to merge 5 commits into
developfrom
pr-preparation

Conversation

@BlackYps

@BlackYps BlackYps commented May 17, 2026

Copy link
Copy Markdown
Contributor

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

  • Chores
    • Improved pull request preparation workflow with automated changelog snippet generation.
    • Updated PR handling to draft status on creation.

Review Change Stack

@coderabbitai

coderabbitai Bot commented May 17, 2026

Copy link
Copy Markdown
Contributor
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description provides context for the changes (automating snippet creation) but is incomplete against the template requirements. Add a 'Testing done on the proposed changes' section and a 'Additional context' section, check the checklist items, and request 2-3 reviewers as indicated in the template.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Enhance automatic pr preparation' is directly related to the changeset which rewrites the PR preparation workflow to add changelog snippet generation functionality.
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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pr-preparation

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.

❤️ Share

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

@github-actions github-actions Bot marked this pull request as draft May 17, 2026 23:26
@BlackYps BlackYps marked this pull request as ready for review May 17, 2026 23:28

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2d3c23e and 87289e8.

📒 Files selected for processing (3)
  • .github/workflows/pr-preparation.yaml
  • changelog/snippets/category.7125.md
  • changelog/snippets/sections/template-snippet.md

Comment thread .github/workflows/pr-preparation.yaml
Comment thread .github/workflows/pr-preparation.yaml
Comment thread changelog/snippets/category.7125.md Outdated
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