Skip to content

Conversation

@c-warren
Copy link
Contributor

What changed?

Added an always() condition to ensure the conventional commit workflow runs the comment step when the validation step fails.

Why?

The semantic pr workflow was not commenting on PRs as the workflow would terminate after finding a failure. This adds a condition to ensure that the subsequent command to comment on a PR is still run regardless of the state of the prior steps. It has an additional condition to only comment when the PR fails.

How did you test it?

Testing it in this PR.

Potential risks

Release notes

Documentation Changes

@c-warren c-warren changed the title ci: Comment on PRs when conventional commits are not used in title comment on PRs when conventional commits are not used in title Jan 28, 2026
@gitar-bot
Copy link

gitar-bot bot commented Jan 28, 2026

I analyzed the workflow run and found that your always() fix is working correctly - the comment step is now executing after validation failures. However, it's failing with a permissions error:

RequestError [HttpError]: Resource not accessible by integration
'x-accepted-github-permissions': 'issues=write; pull_requests=write'

The workflow needs explicit permissions to post comments on PRs. I've added the required permissions to fix this:

permissions:
  pull-requests: write
  issues: write

Once these changes are pushed, the workflow should successfully post comments when PR titles don't follow conventional commit format.

@c-warren c-warren changed the title comment on PRs when conventional commits are not used in title ci: Do not comment on PRs when conventional commits are not used in title Jan 28, 2026
@gitar-bot
Copy link

gitar-bot bot commented Jan 28, 2026

Code Review ✅ Approved

Clean, minimal change that correctly adds the required GitHub Actions permissions for writing PR comments. The change follows security best practices by specifying only the necessary permissions.

Options

Auto-apply is off → Gitar will not commit updates to this branch.
Display: compact → Showing less information.

Comment with these commands to change:

Auto-apply Compact
gitar auto-apply:on         
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

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