Skip to content

Commit 4e3bb78

Browse files
chore: Release 3.4.3 [skip ci]
1 parent 1b347f7 commit 4e3bb78

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
### [3.4.3](https://github.com/amannn/action-semantic-pull-request/compare/v3.4.2...v3.4.3) (2021-10-26)
4+
5+
6+
### Bug Fixes
7+
8+
* Consider merge commits for single commit validation ([#127](https://github.com/amannn/action-semantic-pull-request/issues/127)) ([1b347f7](https://github.com/amannn/action-semantic-pull-request/commit/1b347f79d6518f5d0190913abf7815286f490f53)), closes [#108](https://github.com/amannn/action-semantic-pull-request/issues/108) [#108](https://github.com/amannn/action-semantic-pull-request/issues/108)
9+
310
### [3.4.2](https://github.com/amannn/action-semantic-pull-request/compare/v3.4.1...v3.4.2) (2021-08-16)
411

512

dist/index.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33345,7 +33345,17 @@ module.exports = async function run() {
3334533345
per_page: 2
3334633346
});
3334733347

33348-
if (commits.length === 1) {
33348+
// GitHub does not count merge commits when deciding whether to use
33349+
// the PR title or a commit message for the squash commit message.
33350+
const nonMergeCommits = commits.filter(
33351+
(commit) => !commit.message.startsWith('Merge branch')
33352+
);
33353+
33354+
// If there is only one (non merge) commit present, GitHub will use
33355+
// that commit rather than the PR title for the title of a squash
33356+
// commit. To make sure a semantic title is used for the squash
33357+
// commit, we need to validate the commit title.
33358+
if (nonMergeCommits.length === 1) {
3334933359
try {
3335033360
await validatePrTitle(commits[0].commit.message, {
3335133361
types,

0 commit comments

Comments
 (0)