Skip to content

Conversation

@agaetep
Copy link
Contributor

@agaetep agaetep commented Aug 12, 2025

No description provided.

Copilot AI review requested due to automatic review settings August 12, 2025 21:26
@coderabbitai
Copy link

coderabbitai bot commented Aug 12, 2025

Walkthrough

Updated the PR title lint workflow by adding two inputs to adjust failure handling: no automatic “request changes” on regex mismatches, and the action now fails the workflow on mismatch. Other behavior remains unchanged.

Changes

Cohort / File(s) Change Summary
PR Title Lint Workflow
.github/workflows/_pr-title-lint.yml
Added inputs to morrisoncole/[email protected]: on-failed-regex-request-changes: false, on-failed-regex-fail-action: true. Result: on regex failure, do not request changes; fail the workflow. Other behavior unchanged (failure comment posted; valid titles dismiss reviews).

Sequence Diagram(s)

sequenceDiagram
    actor Developer
    participant GitHub as GitHub (PR)
    participant Workflow as PR Title Lint Workflow
    participant Action as pr-lint-action

    Developer->>GitHub: Open/Update PR
    GitHub->>Workflow: Trigger
    Workflow->>Action: Run title regex check
    alt Title matches regex
        Action-->>Workflow: success
        Workflow-->>GitHub: Dismiss prior review (if any)
    else Title fails regex
        Action-->>GitHub: Post failure comment
        Action-->>Workflow: fail job (no "request changes")
        Workflow-->>GitHub: Workflow marked failed
    end
Loading

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch agaete/pr-title-lint-actions

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Conventional Commits FTW!

@agaetep agaetep changed the title Change behavior of pr-title-lint action to bypass branch protections ci(dev-infra): change behavior of pr-title-lint action to bypass branch protections Aug 12, 2025
@agaetep agaetep requested a review from asithade August 12, 2025 21:28
Copy link

@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: 0

🧹 Nitpick comments (2)
.github/workflows/_pr-title-lint.yml (2)

28-29: Scope the GITHUB_TOKEN permissions explicitly to least privilege.

Because the action still posts a failure comment, it needs pull-requests: write. Recommend adding explicit permissions to the job (or workflow) to avoid broader defaults.

Example:

permissions:
  contents: read
  pull-requests: write

28-29: Pin the action to a commit SHA to reduce supply-chain risk.

Instead of a mutable tag, use a specific commit SHA and keep a comment with the version for readability.

Example:

uses: morrisoncole/pr-lint-action@<pinned_commit_sha> # v1.7.1
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3f0f094 and 835f809.

📒 Files selected for processing (1)
  • .github/workflows/_pr-title-lint.yml (1 hunks)
🔇 Additional comments (2)
.github/workflows/_pr-title-lint.yml (2)

28-29: Change meets objective: failing the action (instead of requesting changes) will block merges without elevated review permissions.

This correctly sidesteps GITHUB_TOKEN review-dismissal limitations while preserving enforcement via a failing status.


28-29: Ensure the status check is required in branch protection.

This job will fail on a bad title; it will only block merges if the “PR Title Lint” job (or its parent workflow’s check) is marked as a required status check on protected branches. Please verify repo settings after merge.

@asithade asithade merged commit c6b02b4 into main Aug 12, 2025
7 of 8 checks passed
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.

3 participants