-
-
Notifications
You must be signed in to change notification settings - Fork 124
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
feat: Allow for custom types #53
Conversation
@@ -1,6 +1,6 @@ | |||
name: 'Lint PR title' | |||
on: | |||
pull_request_target: | |||
pull_request: |
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.
I've changed this to run checks against this branch. It seems like this only works properly when it's the owner making the PR.
# Optionally you can configure which types are allowed. | ||
# Default: https://github.com/commitizen/conventional-commit-types | ||
with: | ||
types: fix, feat |
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.
This is a string, as Github Actions doesn't support array arguments currently.
@@ -7,3 +7,6 @@ runs: | |||
branding: | |||
icon: 'shield' | |||
color: 'green' | |||
inputs: | |||
types: |
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.
Conventional commits calls these "types", therefore I'd go for the same terminology.
const {parserOpts} = await conventionalCommitsConfig(); | ||
const result = parser(prTitle, parserOpts); | ||
|
||
function printAvailableTypes() { |
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.
Sneaked in another improvement here: #45
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.
Good work!
Hey @amannn Will you merge this? |
Based on #47 and #52.
It seems there are some issues with running the latest changes from a branch within a PR workflow, therefore I opened another PR which contains the relevant changes from #47 and #52.
The new behaviour can for example be seen here: https://github.com/amannn/action-semantic-pull-request/runs/1273430601
Resolves #39
Resolves #45
Closes #47
Closes #52