-
Notifications
You must be signed in to change notification settings - Fork 7
feat: add PR title validation workflow #38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Introduced a GitHub Actions workflow to validate pull request titles against conventional commit standards. - The workflow triggers on PR events (opened, reopened, synchronized, edited) and provides feedback on title formatting. - Includes documentation for allowed title formats and examples to guide contributors in writing appropriate titles.
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📝 WalkthroughWalkthroughAdds a new GitHub Actions workflow that validates pull request titles on PR events using amannn/action-semantic-pull-request (v6.1.1). If validation fails the job prints structured guidance and exits with a non‑zero status. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User (opens PR)
participant GitHub as GitHub Actions
participant Runner as Actions Runner
participant Action as Semantic PR Action
User->>GitHub: Open/Reopen/Synchronize/Edit PR
GitHub->>Runner: Trigger pr-title-check workflow
Runner->>Action: Run amannn/action-semantic-pull-request@v6.1.1
Action-->>Runner: Validation result (pass/fail)
alt pass
Runner-->>GitHub: Job completes (success)
else fail
Runner->>Runner: Print failure documentation
Runner-->>GitHub: Job fails (exit 1)
end
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In @.github/workflows/pr-title-check.yml:
- Line 16: The workflow uses an invalid runner label "ubuntu-slim" in the
runs-on setting; update the runs-on value in the CI workflow (the runs-on entry
in the YAML for the PR title check) to a valid GitHub-hosted runner such as
"ubuntu-latest" or a specific supported label like "ubuntu-24.04" to prevent
immediate workflow failure.
- Around line 29-32: The PR title is being interpolated directly into the shell
run block (echo "**Current title:** `${{ github.event.pull_request.title }}`"),
creating a command-injection risk; change the step to pass
github.event.pull_request.title into a safe environment variable (e.g., env:
PR_TITLE: ${{ github.event.pull_request.title }}) and then reference that
variable in the run script using a safe expansion/printing idiom (for example
echo "**Current title:** \"$PR_TITLE\"" or printf '%s\n' "$PR_TITLE") so
backticks or other shell metacharacters cannot be executed; update the run block
where the current title is printed to use PR_TITLE instead of direct
interpolation.
|
|
||
| jobs: | ||
| validate-pr-title: | ||
| runs-on: ubuntu-slim |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ubuntu-slim is not a valid GitHub-hosted runner label.
This will cause the workflow to fail immediately. Use ubuntu-latest (or a specific version like ubuntu-24.04).
Proposed fix
- runs-on: ubuntu-slim
+ runs-on: ubuntu-latest📝 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.
| runs-on: ubuntu-slim | |
| runs-on: ubuntu-latest |
🤖 Prompt for AI Agents
In @.github/workflows/pr-title-check.yml at line 16, The workflow uses an
invalid runner label "ubuntu-slim" in the runs-on setting; update the runs-on
value in the CI workflow (the runs-on entry in the YAML for the PR title check)
to a valid GitHub-hosted runner such as "ubuntu-latest" or a specific supported
label like "ubuntu-24.04" to prevent immediate workflow failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ubuntu-slim is a valid runner
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🌐 Web query:
GitHub Actions ubuntu-slim runner 2026
💡 Result:
In 2026, ubuntu-slim is a GitHub-hosted runner label for a single-CPU Ubuntu environment intended for lightweight/short jobs (automation, issue ops), not heavyweight CI builds [1]. It runs in a container (not a full VM) and comes with a minimal preinstalled toolset [1].
Specs / limits (standard runners):
- 1 vCPU, 5 GB RAM, 14 GB SSD, x64 [1]
- Job timeout: 15 minutes [1]
How to use:
jobs:
build:
runs-on: ubuntu-slimubuntu-slim is listed as an Ubuntu Slim (preview) image in the actions/runner-images repo (the source of what’s installed on GitHub-hosted runner images) [2].
Sources: GitHub-hosted runners reference [1]; actions/runner-images README [2].
@harshtandiya, you're absolutely correct, and I apologize for the incorrect review comment.
ubuntu-slim is indeed a valid GitHub-hosted runner label introduced as a preview feature. It's a single-CPU Ubuntu environment designed specifically for lightweight automation tasks like PR title validation, with these characteristics:
- 1 vCPU, 5 GB RAM, 14 GB SSD
- 15-minute job timeout
- Runs in a container (not a full VM)
- Minimal preinstalled toolset
This runner is actually well-suited for your PR title validation workflow since it's a lightweight task that doesn't require extensive resources. Thank you for the correction!
- Updated the GitHub Actions workflow to include the GITHUB_TOKEN environment variable for improved authentication during PR title validation.
Summary by CodeRabbit