-
Notifications
You must be signed in to change notification settings - Fork 17
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: add 'lowercase-title' option to upgrade action #218
Conversation
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
@TylerJang27 Could you take a look at this? |
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.
Thank you for the contribution!
Hi, thanks for taking a look. Sure thing, I have now fixed the stylelint issue. To test the change I have a title_message="Upgrade trunk"
if [[ ${LOWERCASE_TITLE} == "true" ]]; then
title_message=$(echo "${title_message}" | tr '[:upper:]' '[:lower:]')
fi
echo "${title_message}" and executed it with different options:
|
Adds 'lowercase-title' option to the 'trunk-action/upgrade' action. Specifying the option converts the PR / commit title "Upgrade trunk" to lowercase, i.e. "upgrade trunk" Example usage: - uses: trunk-io/trunk-action/upgrade@v1 with: prefix: "chore(deps): " lowercase-title: true This change makes it possible to use the trunk upgrade action in a way that conforms to the commitlint '@commitlint/config-conventional' configuration which specifies that commit message subject must not be sentence-case, start-case, pascal-case, upper-case. With the default commit message title "Upgrade trunk" and `prefix: "chore(deps): "` the following error is emitted by commitlint using `config-conventional`: ⧗ input: chore(deps): Upgrade trunk to 1.19.0 ✖ subject must not be sentence-case, start-case, pascal-case, upper-case [subject-case] ✖ found 1 problems, 0 warnings ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint
Implemented upstream in trunk-io/trunk-action#218
These options are added to get the automated commit to pass commitlint. Implemented upstream in trunk-io/trunk-action#218
Thank you @TylerJang27 for your review and for merging this into main. Could we possibly arrange for a new release to be issued? This would allow us to utilize the new option. |
Yep, we'll get this released shortly! @puzzler7 |
@rriski It's released and the |
Adds 'lowercase-title' option to the 'trunk-action/upgrade' action. Specifying the option converts the PR / commit title "Upgrade trunk" to lowercase, i.e. "upgrade trunk"
Example usage:
This change makes it possible to use the trunk upgrade action in a way that conforms to the commitlint '@commitlint/config-conventional' configuration which specifies that commit message subject must not be sentence-case, start-case, pascal-case, upper-case. With the default commit message title "Upgrade trunk" and
prefix: "chore(deps): "
the following error is emitted by commitlint usingconfig-conventional
:⧗ input: chore(deps): Upgrade trunk to 1.19.0
✖ subject must not be sentence-case, start-case, pascal-case, upper-case [subject-case]
✖ found 1 problems, 0 warnings
ⓘ Get help: https://github.com/conventional-changelog/commitlint/#what-is-commitlint