-
Notifications
You must be signed in to change notification settings - Fork 148
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(ci): add Conventional Commits GitHub Action #3030
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Conventional Commits | ||
|
||
on: | ||
pull_request_target: | ||
types: | ||
- opened | ||
- edited | ||
- synchronize | ||
- reopened | ||
|
||
permissions: | ||
pull-requests: read | ||
|
||
jobs: | ||
commit-lint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- name: Lint Commits | ||
uses: wagoid/commitlint-github-action@v6 | ||
- name: Lint Pull Request | ||
uses: amannn/action-semantic-pull-request@v5.5.3 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | ||
with: | ||
types: | | ||
feat | ||
fix | ||
docs | ||
style | ||
refactor | ||
perf | ||
test | ||
chore | ||
vendor | ||
build | ||
ci | ||
revert | ||
BREAKING | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For breaking change, we can just use the second format via
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. After thinking, we can keep this as it's also valid. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CUSTOM_GITHUB_TOKEN
has more permissions than the built-in one. Can we just use the built-in token (each action will automatically create a token for the action and delete it after the action is finished) instead?ref: https://github.com/wagoid/commitlint-github-action#token