Skip to content

Commit 44700cf

Browse files
authored
chore: [DevOps] PR Title Linter (#273)
1 parent 602bbe0 commit 44700cf

File tree

2 files changed

+34
-1
lines changed

2 files changed

+34
-1
lines changed

.github/workflows/pr-lint.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: lint pr
2+
3+
on:
4+
pull_request_target:
5+
types:
6+
- opened
7+
- edited
8+
- synchronize
9+
10+
permissions:
11+
pull-requests: read
12+
13+
jobs:
14+
lint-pr:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: amannn/action-semantic-pull-request@v5
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
with:
21+
scopes: |
22+
Core
23+
OpenAI
24+
Orchestration
25+
DevOps
26+
headerPattern: '^(\w.+): (?:\[(\w.+)\] )?(.+)$'
27+
headerPatternCorrespondence: type, scope, subject
28+
# for available types, check:
29+
# https://github.com/commitizen/conventional-commit-types/blob/master/index.json
30+
subjectPatternError: |
31+
The subject "{subject}" found in the pull request title "{title}"
32+
didn't match the configured pattern. Please ensure that the subject
33+
starts with an uppercase character, e.g. "feat: New Feature".

.github/workflows/prepare-release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ jobs:
144144
run: |
145145
COMMIT_URL=${{ github.event.repository.html_url }}/commit/${{ needs.bump-version.outputs.release-commit }}
146146
147-
PR_URL=$(gh pr create --title "Release ${{ needs.bump-version.outputs.release-version }}" --body "## TODOs
147+
PR_URL=$(gh pr create --title "feat: Release ${{ needs.bump-version.outputs.release-version }}" --body "## TODOs
148148
- [ ] Review the changes in [the release commit]($COMMIT_URL)
149149
- [ ] Review the [Draft Release](${{ needs.create-release.outputs.release-url }})
150150
- [ ] Review **and approve** this PR

0 commit comments

Comments
 (0)