Skip to content

Commit 50cdd75

Browse files
meorphismeorphis
andauthored
do not create release pr if only commits are codegen metadata (#210)
Co-authored-by: meorphis <[email protected]>
1 parent 78630a2 commit 50cdd75

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/strategies/base.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -289,8 +289,14 @@ export abstract class BaseStrategy implements Strategy {
289289
const mergeCommitRegex =
290290
/^Merge pull request #\d+ from [^/]+\/release-please(--[\w-]+)+$/;
291291

292-
// if there are no commits that are not release pr merge commits, there's nothing to include in a new release PR
293-
if (commits.every(c => mergeCommitRegex.test(c.message))) {
292+
// if there are no commits that are not either release pr merge commits or metadata commits,
293+
// there's nothing to include in a new release PR
294+
if (
295+
commits.every(
296+
c =>
297+
mergeCommitRegex.test(c.message) || c.message === 'codegen metadata'
298+
)
299+
) {
294300
this.logger.info(
295301
`No commits to consider for ${this.path}, all commits are merges of release PRs`
296302
);

0 commit comments

Comments
 (0)