ci: automate renaming of Snyk PRs to conventional commits (CN-841)#758
ci: automate renaming of Snyk PRs to conventional commits (CN-841)#758parker-snyk wants to merge 3 commits intomainfrom
Conversation
Our linter requires the commit message to be a conventional commit. When merging a PR, the title is used as the git commit message by default. This change automatically renames PRs starting with '[Snyk]' (e.g., '[Snyk] Update') to follow the conventional commit format (e.g., 'fix: snyk update'). This will make it easier for automated vulnerability fixes to merge in without issue.
This comment has been minimized.
This comment has been minimized.
PR Reviewer Guide 🔍
|
| gh pr edit ${{ github.event.pull_request.number }} --title "$NEW_TITLE" --repo ${{ github.repository }} | ||
|
|
||
| - name: Check PR Title | ||
| if: ${{ !startsWith(github.event.pull_request.title, '[Snyk]') }} |
There was a problem hiding this comment.
This means the rest of the semantic PR checking will never happen for '[Snyk]' ... PRs, right? Will something else catch if the stuff after the [Snyk] violates conventional commit spec? Or does it not matter for some reason?
As an aside... have we asked in prod-sec or posted in #snyk-on-snyk-dogfooding if there is a way to change or configure the format of Snyk PRs?
Jira Issue: CN-841
Our linter requires the commit message to be a conventional commit. When merging a PR, the title is used as the git commit message by default.
This change automatically renames PRs starting with
[Snyk](e.g.,[Snyk] Update) to follow the conventional commit format (e.g.,fix: snyk update). This will make it easier for automated vulnerability fixes to merge in without issue and pass the existingpr-title-checkjob.