-
Notifications
You must be signed in to change notification settings - Fork 100
feat: adds action to lint conventional commits #1902
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
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,47 @@ | ||||||||||||||||||||||
name: Conventional Commits | ||||||||||||||||||||||
on: | ||||||||||||||||||||||
pull_request: | ||||||||||||||||||||||
types: | ||||||||||||||||||||||
- opened | ||||||||||||||||||||||
- edited | ||||||||||||||||||||||
- synchronize | ||||||||||||||||||||||
jobs: | ||||||||||||||||||||||
default: | ||||||||||||||||||||||
runs-on: ubuntu-latest | ||||||||||||||||||||||
steps: | ||||||||||||||||||||||
- uses: amannn/action-semantic-pull-request@v5 | ||||||||||||||||||||||
id: lint | ||||||||||||||||||||||
env: | ||||||||||||||||||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||||||||||||||||||||||
with: | ||||||||||||||||||||||
types: | | ||||||||||||||||||||||
build | ||||||||||||||||||||||
chore | ||||||||||||||||||||||
ci | ||||||||||||||||||||||
docs | ||||||||||||||||||||||
feat | ||||||||||||||||||||||
fix | ||||||||||||||||||||||
perf | ||||||||||||||||||||||
style | ||||||||||||||||||||||
refactor | ||||||||||||||||||||||
test | ||||||||||||||||||||||
- uses: marocchino/sticky-pull-request-comment@v2 | ||||||||||||||||||||||
if: always() && (steps.lint.outputs.error_message != null) | ||||||||||||||||||||||
with: | ||||||||||||||||||||||
header: lint-error | ||||||||||||||||||||||
message: | | ||||||||||||||||||||||
Hey there! 👋 | ||||||||||||||||||||||
|
||||||||||||||||||||||
We noticed that the title of your pull request doesn't follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. To ensure consistency, we kindly ask you to adjust the title accordingly. | ||||||||||||||||||||||
|
||||||||||||||||||||||
Details are below the break: | ||||||||||||||||||||||
|
||||||||||||||||||||||
---------------------------- | ||||||||||||||||||||||
|
||||||||||||||||||||||
${{ steps.lint.outputs.error_message }} | ||||||||||||||||||||||
Comment on lines
+37
to
+41
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. Can we put this in a details element instead?
Suggested change
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. I'll PR this 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. Those tags hide the information by default. If we can have it auto expanded, I'd be up for it. |
||||||||||||||||||||||
|
||||||||||||||||||||||
- if: ${{ steps.lint.outputs.error_message == null }} | ||||||||||||||||||||||
uses: marocchino/sticky-pull-request-comment@v2 | ||||||||||||||||||||||
with: | ||||||||||||||||||||||
header: lint-error | ||||||||||||||||||||||
delete: true |
Uh oh!
There was an error while loading. Please reload this page.