Skip to content

ci: Add PR title linting workflow#71

Merged
yacosta738 merged 1 commit intomainfrom
semantic-pull-request
Jan 24, 2026
Merged

ci: Add PR title linting workflow#71
yacosta738 merged 1 commit intomainfrom
semantic-pull-request

Conversation

@yacosta738
Copy link
Copy Markdown
Contributor

This workflow validates pull request titles against the Conventional Commits specification and provides feedback if the title does not comply.

This workflow validates pull request titles against the Conventional Commits specification and provides feedback if the title does not comply.
@github-actions
Copy link
Copy Markdown

Thank you for contributing to this project with this PR, welcome to the community and the amazing world of open source

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 24, 2026

📝 Walkthrough

Summary by CodeRabbit

  • Chores
    • Added automated pull request title validation enforcing conventional commit conventions. PR titles that don't comply will receive immediate automated feedback via pull request comments. When issues are resolved, comments are automatically cleaned up. This helps maintain code quality and consistency standards across the project.

✏️ Tip: You can customize this high-level summary in your review settings.

Walkthrough

Introduces 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

Cohort / File(s) Summary
GitHub Actions Workflow Configuration
\.github/workflows/semantic-pull-request.yml
New workflow "Lint PR title" that validates PR titles against Conventional Commits standards on pull requests (opened, edited, synchronize). Uses pinned action versions to check title conformance and conditionally post/delete error comments via sticky PR comments. Skips execution for dependabot[bot] actor.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 A hop, a check, a title true,
Semantic standards through and through,
No fuzzy commits shall slip on by,
Our PR titles clean and spry! 🎯

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title 'ci: Add PR title linting workflow' directly and accurately describes the main change - adding a new GitHub Actions workflow for PR title linting.
Description check ✅ Passed The description explains the workflow's purpose of validating PR titles against Conventional Commits specification, which aligns with the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch semantic-pull-request

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

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.

Comment on lines +23 to +24
# Pinned to v5 commit hash for security
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6
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.

⚠️ Potential issue | 🟡 Minor

🧩 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 to v6.1.1 (commit 48f2562, dated 2025-08-22). [1]
  • v5 → points to commit e32d7e6 (“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.

Comment on lines +29 to +45
# 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 }}
```
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.

🧹 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.

Comment on lines +47 to +53
# 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
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.

🧹 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.

Suggested change
# 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.

@yacosta738 yacosta738 merged commit f080e84 into main Jan 24, 2026
16 of 17 checks passed
@yacosta738 yacosta738 deleted the semantic-pull-request branch January 24, 2026 12:03
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.

1 participant