Skip to content

fix: add PR title lint workflow#191

Merged
ejevon merged 4 commits into
mainfrom
claude/github-actions-pr-tests-vnok6l
Jul 10, 2026
Merged

fix: add PR title lint workflow#191
ejevon merged 4 commits into
mainfrom
claude/github-actions-pr-tests-vnok6l

Conversation

@ejevon

@ejevon ejevon commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

What changed

Adds .github/workflows/pr-lint.yml, which enforces conventional commit PR titles using the shared ossprey/cicd/pr-lint@main action on opened, edited and reopened pull request events. This matches the existing setup in the ossprey and dashboard repos and is part of an org wide rollout.

Notes

The check only gates merges once lint-title is added as a required status check in branch protection. No runtime code is affected.

🤖 Generated with Claude Code

https://claude.ai/code/session_0126vwoz9uFAw2GHZWNABAWX


Generated by Claude Code

Enforce conventional commit PR titles via ossprey/cicd/pr-lint on
opened, edited and reopened pull request events.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0126vwoz9uFAw2GHZWNABAWX
@ejevon ejevon changed the title ci: add PR title lint workflow fix: add PR title lint workflow Jul 10, 2026
Comment thread .github/workflows/pr-lint.yml Outdated
permissions:
pull-requests: read
steps:
- uses: amannn/action-semantic-pull-request@v5

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.

Can we instead not use external GH actions and give them our GH token, it's a bit of a security risk :/

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good call. Dropped the external amannn/action-semantic-pull-request action entirely so no third party gets GITHUB_TOKEN. The title lint is now an inline shell check reading github.event.pull_request.title from the event payload (the action only needed the token to fetch what's already there). Title is passed via an env var rather than interpolated into the script to avoid shell injection, and permissions is now {} since no API access is needed.


Generated by Claude Code

Replace the third-party amannn/action-semantic-pull-request@v5 action,
which was handed secrets.GITHUB_TOKEN, with an inline shell check that
validates the PR title against Conventional Commits using the event
payload. This addresses the review concern about exposing our GitHub
token to an external action.

- No external action and no token are used; the PR title is read from
  github.event.pull_request.title.
- The title is passed via an env var (not interpolated into the script)
  to avoid shell injection.
- permissions is set to {} since no API access is required.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KtGBySiTPMbsJKPYb7zYYj
@ejevon ejevon merged commit 83c54b4 into main Jul 10, 2026
3 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.

4 participants