-
Notifications
You must be signed in to change notification settings - Fork 166
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
build: Add checker for PR title #151
Conversation
run: | | ||
if ! echo $PR_TITLE | grep -Eq '^(\w+)(\(.+\))?: .+$'; then | ||
echo "PR title does not follow conventional commit style." | ||
echo "Please use a title in the format: type: message, or type(scope): message" |
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 think its misleading a bit, @sunchao
maybe we can attach a title example?
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.
OK, added an example
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.
Much nicer
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.
lgtm thanks @sunchao
Thanks, merged |
Which issue does this PR close?
Closes #75 .
Rationale for this change
It be useful to add a checker making sure all the PR titles conform to certain format, such as conventional commits.
What changes are included in this PR?
Added a Github action to check PR title and fail the PR if it violates the format. At the moment, the format is simply "type: message" or "type(scope): message". We don't restrict the set of valid types or scopes yet.
How are these changes tested?