You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+13-12Lines changed: 13 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,8 +19,9 @@ See [Conventional Commits](https://www.conventionalcommits.org/) for more exampl
19
19
20
20
1. If your goal is to create squashed commits that will be used for automated releases, you'll want to configure your GitHub repository to [use the squash & merge strategy](https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/configuring-pull-request-merges/configuring-commit-squashing-for-pull-requests) and tick the option "Default to PR title for squash merge commits".
21
21
2.[Add the action](https://docs.github.com/en/actions/quickstart) with the following configuration:
@@ -123,7 +124,7 @@ This will prevent the PR title from being validated, and pull request checks wil
123
124
**Attention**: If you want to use the this feature, you need to grant the `pull-requests: write` permission to the GitHub Action. This is because the action will update the status of the PR to remain in a pending state while `[WIP]` is present in the PR title.
### Legacy configuration for validating single commits
146
147
147
-
When using "Squash and merge" on a PR with only one commit, GitHub will suggest using that commit message instead of the PR title for the merge commit. As it's easy to commit this by mistake this action supports two configuration options to provide additional validation for this case.
148
+
When using "Squash and merge" on a PR with only one commit, GitHub will suggest using that commit message instead of the PR title for the merge commit. As it's easy to commit this by mistake this action supports two configuration options to provide additional validation for this case.
148
149
149
150
```yml
150
151
# If the PR only contains a single commit, the action will validate that
@@ -174,8 +175,8 @@ There are two events that can be used as triggers for this action, each with dif
Hey there and thank you for opening this pull request! 👋🏼
209
-
210
+
210
211
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/) and it looks like your proposed title needs to be adjusted.
211
212
212
213
Details:
213
-
214
+
214
215
```
215
216
${{ steps.lint_pr_title.outputs.error_message }}
216
217
```
217
218
218
219
# Delete a previous comment when the issue has been resolved
@@ -118,6 +117,7 @@ module.exports = async function run() {
118
117
headerPattern,
119
118
headerPatternCorrespondence
120
119
});
120
+
// eslint-disable-next-line unicorn/prefer-optional-catch-binding, no-unused-vars -- Legacy syntax for compatibility
121
121
}catch(error){
122
122
thrownewError(
123
123
`Pull request has only one commit and it's not semantic; this may lead to a non-semantic commit in the base branch (see https://github.com/community/community/discussions/16271 ). Amend the commit message to match the pull request title, or add another commit.`
@@ -158,8 +158,8 @@ module.exports = async function run() {
0 commit comments