Skip to content

Commit 7a3640b

Browse files
committed
return early if no comments
1 parent 66f786c commit 7a3640b

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

dist/index.js

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/generate-changelog.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,12 @@ export async function generateChangelog(
7474

7575
const commits = command.stdout.trim().split('\n')
7676
core.info(`Found commits ${command}`)
77+
78+
// There were no differences in commits between the current version and the previous version.
79+
if (commits.length === 0) {
80+
return {added: undefined, fixed: undefined}
81+
}
82+
7783
const pullRequestMetadata = await fetchPullRequestBodyFromCommits(
7884
commits,
7985
graphqlWithAuth

0 commit comments

Comments
 (0)