Conversation
This workflow validates pull request titles against the Conventional Commits specification and provides feedback if the title does not comply.
|
Thank you for contributing to this project with this PR, welcome to the community and the amazing world of open source |
📝 WalkthroughSummary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings. WalkthroughIntroduces a new GitHub Actions workflow that enforces semantic PR title conventions. The workflow validates PR titles using a semantic linting action and posts error comments on non-conforming titles, automatically removing comments when corrected. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 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.
Actionable comments posted: 3
🤖 Fix all issues with AI agents
In @.github/workflows/semantic-pull-request.yml:
- Around line 47-53: Reorder the step properties so the uses line for
marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405
appears before the if condition (which currently checks
steps.lint_pr_title.outputs.error_message == null); move the if: ${{
steps.lint_pr_title.outputs.error_message == null }} to follow the uses/with
block to match conventional GitHub Actions ordering while preserving the same
condition and the with: header/delete settings.
- Around line 29-45: The YAML block has inconsistent indentation: the if key is
indented more than the uses key; align the indentation of if with uses so both
are at the same level under the step that uses
marocchino/sticky-pull-request-comment@7737449, and ensure the with, header, and
message keys remain nested under the step (same indentation level as if/uses).
Specifically, adjust the indentation around uses, if, with, header, and message
so that uses and if are sibling keys and with/header/message are children of the
step referencing steps.lint_pr_title.outputs.error_message.
- Around line 23-24: Update the inline comment that currently reads "Pinned to
v5 commit hash for security" to "Pinned to v6 commit hash for security" to
reflect that the pinned action reference uses
amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50
(v6.1.1); locate the uses entry for
amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 and
change the adjacent comment text accordingly.
| # Pinned to v5 commit hash for security | ||
| - uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6 |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
amannn/action-semantic-pull-request 48f256284bd46cdaab1048c3721360e808335d50 version
💡 Result:
Commit 48f256284bd46cdaab1048c3721360e808335d50 in amannn/action-semantic-pull-request corresponds to release/tag v6.1.1 (released 2025-08-22). [1][2]
🌐 Web query:
amannn/action-semantic-pull-request v5 v6 release tags
💡 Result:
Current major-version tags for amannn/action-semantic-pull-request:
v6→ points tov6.1.1(commit48f2562, dated 2025-08-22). [1]v5→ points to commite32d7e6(“chore: Update major tag”), dated 2024-06-10. [1]
Related (for context): the latest v5.x release tag is v5.5.3 (commit 0723387, dated 2024-06-28). [1]
Sources: [1]
Update version comment from v5 to v6.
The commit hash 48f256284bd46cdaab1048c3721360e808335d50 corresponds to v6.1.1, not v5. Update line 23 to say "Pinned to v6 commit hash for security" to match the inline comment on line 24.
🤖 Prompt for AI Agents
In @.github/workflows/semantic-pull-request.yml around lines 23 - 24, Update the
inline comment that currently reads "Pinned to v5 commit hash for security" to
"Pinned to v6 commit hash for security" to reflect that the pinned action
reference uses
amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50
(v6.1.1); locate the uses entry for
amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 and
change the adjacent comment text accordingly.
| # Pinned to v2 commit hash for security | ||
| - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2 | ||
| # When the previous steps fails, the workflow would stop. By adding this | ||
| # condition you can continue the execution with the populated error message. | ||
| if: always() && (steps.lint_pr_title.outputs.error_message != null) | ||
| with: | ||
| header: pr-title-lint-error | ||
| message: | | ||
| Hey there and thank you for opening this pull request! 👋🏼 | ||
|
|
||
| We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted. | ||
|
|
||
| Details: | ||
|
|
||
| ``` | ||
| ${{ steps.lint_pr_title.outputs.error_message }} | ||
| ``` |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
YAML indentation is inconsistent.
The if keyword on line 33 has extra indentation compared to the uses keyword on line 30. While this may still work, it deviates from standard YAML formatting for GitHub Actions and reduces readability.
Proposed fix for consistent indentation
# Pinned to v2 commit hash for security
- uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2
- # When the previous steps fails, the workflow would stop. By adding this
- # condition you can continue the execution with the populated error message.
- if: always() && (steps.lint_pr_title.outputs.error_message != null)
+ # When the previous steps fails, the workflow would stop. By adding this
+ # condition you can continue the execution with the populated error message.
+ if: always() && (steps.lint_pr_title.outputs.error_message != null)
with:🤖 Prompt for AI Agents
In @.github/workflows/semantic-pull-request.yml around lines 29 - 45, The YAML
block has inconsistent indentation: the if key is indented more than the uses
key; align the indentation of if with uses so both are at the same level under
the step that uses marocchino/sticky-pull-request-comment@7737449, and ensure
the with, header, and message keys remain nested under the step (same
indentation level as if/uses). Specifically, adjust the indentation around uses,
if, with, header, and message so that uses and if are sibling keys and
with/header/message are children of the step referencing
steps.lint_pr_title.outputs.error_message.
| # Delete a previous comment when the issue has been resolved | ||
| - if: ${{ steps.lint_pr_title.outputs.error_message == null }} | ||
| # Pinned to v2 commit hash for security | ||
| uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2 | ||
| with: | ||
| header: pr-title-lint-error | ||
| delete: true |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Non-standard step property ordering.
The if condition appears before uses, which is unconventional. While functionally valid, GitHub Actions documentation and most examples place uses before if. Consider reordering for consistency with the community convention and easier scanning.
Proposed fix for consistent ordering
# Delete a previous comment when the issue has been resolved
- - if: ${{ steps.lint_pr_title.outputs.error_message == null }}
- # Pinned to v2 commit hash for security
- uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2
+ # Pinned to v2 commit hash for security
+ - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2
+ if: ${{ steps.lint_pr_title.outputs.error_message == null }}
with:
header: pr-title-lint-error
delete: true📝 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.
| # Delete a previous comment when the issue has been resolved | |
| - if: ${{ steps.lint_pr_title.outputs.error_message == null }} | |
| # Pinned to v2 commit hash for security | |
| uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2 | |
| with: | |
| header: pr-title-lint-error | |
| delete: true | |
| # Delete a previous comment when the issue has been resolved | |
| # Pinned to v2 commit hash for security | |
| - uses: marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405 # v2 | |
| if: ${{ steps.lint_pr_title.outputs.error_message == null }} | |
| with: | |
| header: pr-title-lint-error | |
| delete: true |
🤖 Prompt for AI Agents
In @.github/workflows/semantic-pull-request.yml around lines 47 - 53, Reorder
the step properties so the uses line for
marocchino/sticky-pull-request-comment@773744901bac0e8cbb5a0dc842800d45e9b2b405
appears before the if condition (which currently checks
steps.lint_pr_title.outputs.error_message == null); move the if: ${{
steps.lint_pr_title.outputs.error_message == null }} to follow the uses/with
block to match conventional GitHub Actions ordering while preserving the same
condition and the with: header/delete settings.
This workflow validates pull request titles against the Conventional Commits specification and provides feedback if the title does not comply.