🌱 Introduce PR conventions check workflow#552
Conversation
Adding a github workflow checking Konveyor-like PR conventions. Adds `:gitmoji: Title` format. Signed-off-by: Marek Aufart <maufart@redhat.com>
|
Warning Review limit reached
Next review available in: 29 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. 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 Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughA new GitHub Actions workflow file ChangesPR Title Verification Workflow
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
|
Setting to draft until @istein1 confirms the used emojis are OK for our other project management tool integration. |
Test Coverage ReportTotal: 46.7% Per-package coverage
Full function-level detailsPosted by CI |
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-title-check.yml:
- Line 1: The workflow name in the file contains a typo where "Convetions" is
misspelled. Correct the typo by changing "PR Convetions Checks" to "PR
Conventions Checks" in the name field at the top of the workflow file to ensure
proper spelling and clarity in the GitHub Actions UI.
- Around line 16-18: The workflow is using a mutable branch reference (`@main`)
for the konveyor/release-tools/cmd/verify-pr action, which is a supply-chain
security risk, especially when passing GITHUB_TOKEN with broad repository
access. Replace the `@main` reference with a pinned commit SHA (e.g.,
`@abc1234def567890`) for this action. Additionally, apply the same hardening to
other workflows that use similar mutable branch references such as
konveyor/github-actions/require-matching-label@main and
konveyor/github-actions/reconcile-issue@main throughout all workflow files.
- Around line 12-13: The Checkout step is using the deprecated
actions/checkout@v3 which is incompatible with Node.js 20 on current GitHub
Actions runners and poses a security risk by persisting authentication
credentials in git config. Update the uses field from actions/checkout@v3 to
actions/checkout@v4 pinned to a specific commit SHA (like
`@a5ac7e51b41094c153dea493a23456ca4531ec9c`) for supply chain security.
Additionally, add a with section to the Checkout step that sets
persist-credentials to false, since this PR title check workflow only requires
read access to the repository and does not need to push changes or use git
credentials.
- Around line 3-5: The workflow currently uses `pull_request_target` as the
trigger event, which is unnecessarily privileged for this PR title validation
check and creates a security risk on forked PRs. Since this workflow only
validates PR metadata and does not require elevated permissions, replace the
`pull_request_target` trigger with `pull_request` while keeping the same event
types (opened, edited, reopened, synchronize) to reduce the privilege scope.
🪄 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: 5d2888e1-2115-4bd6-a933-13a5228816df
📒 Files selected for processing (1)
.github/workflows/pr-title-check.yml
|
@aufi , I can confirm that sync2jira tool works fine with the gitmoji in the title and it passed it to Jira when mirroring. This PR LGTM, just need to address/reject the codeRabbit comments. |
Signed-off-by: Marek Aufart <maufart@redhat.com>
Signed-off-by: Marek Aufart <maufart@redhat.com>
As discussed on team call, adding a github workflow checking Konveyor-like PR conventions, primary
:gitmoji: Titleformat.Examples: https://github.com/konveyor/release-tools/blob/main/pkg/pr/prefix.go#L12-L38
Summary by CodeRabbit