ci: validate conventional pull request titles - #164
Conversation
WalkthroughAdded a GitHub Actions workflow for pull request title validation. The workflow runs when a pull request opens, changes, reopens, or becomes ready for review. It accepts supported commit types, optional scopes and breaking-change markers, and a required description. Invalid titles print an error and fail the workflow. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: a4da6327-7b0b-463e-af53-d3071b15bbfe
📒 Files selected for processing (1)
.github/workflows/conventional-title.yml
Included review availability: Your plan includes up to 1 review per rolling hour; 0 remain after this review.
| permissions: | ||
| contents: read |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -eu
file=".github/workflows/conventional-title.yml"
if [ ! -f "$file" ]; then
printf 'missing: %s\n' "$file"
exit 0
fi
printf '%s\n' '--- workflow ---'
cat -n "$file"
printf '%s\n' '--- related token and permission references ---'
rg -n -i 'permissions|GITHUB_TOKEN|github\.event|pull_request|checkout|github api|curl|gh ' .github/workflows "$file" 2>/dev/null || true
printf '%s\n' '--- workflow files ---'
git ls-files '.github/workflows/*'Repository: athal7/opencode-pilot
Length of output: 1864
Remove the unused contents permission.
This workflow only reads github.event.pull_request.title. Set workflow permissions to {}. Add a specific permission only if a later step requires it.
Proposed fix
permissions:
- contents: read
+ {}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| permissions: | |
| contents: read | |
| permissions: | |
| {} |
Adds Conventional Commit validation for pull request titles.