Skip to content

Commit 66f786c

Browse files
committed
add better logging
1 parent b1012c9 commit 66f786c

File tree

3 files changed

+29
-1
lines changed

3 files changed

+29
-1
lines changed

dist/index.js

Lines changed: 23 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: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import {graphql} from '@octokit/graphql'
2+
import * as core from '@actions/core'
23
import shell from 'shelljs'
34

45
// Regexes to find the changelog contents within a PR.
@@ -48,6 +49,7 @@ export async function generateChangelog(
4849
)
4950
) {
5051
if (isVersionGreater(currentVersion, release.version)) {
52+
core.info(`Previous release is ${release.version}`)
5153
lastReleaseVersion = release.version
5254
break
5355
}
@@ -62,13 +64,16 @@ export async function generateChangelog(
6264
const currentBranch = branchFromVersion(currentVersion, channel)
6365
const previousBranch = branchFromVersion(lastReleaseVersion, channel)
6466

67+
core.info(`Comparing ${currentBranch} with ${previousBranch}`)
68+
6569
// Find all the commits that are in `currentBranch` but not `previousBranch`.
6670
const command = shell.exec(
6771
`git --no-pager log ^${previousBranch} ${currentBranch} --pretty=format:%H`,
6872
{silent: true}
6973
)
7074

7175
const commits = command.stdout.trim().split('\n')
76+
core.info(`Found commits ${command}`)
7277
const pullRequestMetadata = await fetchPullRequestBodyFromCommits(
7378
commits,
7479
graphqlWithAuth

0 commit comments

Comments
 (0)