Skip to content

Commit

Permalink
chore: Add result log.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jan 6, 2021
1 parent 92c4b21 commit d14930f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ async function run() {
}
let changelog = '';
for (const data of commits.data.commits) {
core.info(`Commit Data: \x1b[34m${JSON.stringify(data)}\x1b[0m`);
core.info(`Commit: \x1b[34m${data.commit.message}\x1b[0m \x1b[34m${data.commit.committer.name}\x1b[0m ${data.sha}`);
changelog += formatStringCommit(data.commit.message, `${owner}/${repo}`, {
regExp, shortHash: data.sha.slice(0, 7), filterAuthor, hash: data.sha, author: data.commit.committer.name
Expand All @@ -85,8 +84,8 @@ async function run() {
core.info(`Tag: \x1b[34m${tagRef || '-'}\x1b[0m`);
core.info(`Input head-ref: \x1b[34m${headRef}\x1b[0m`);
core.info(`Input base-ref: \x1b[34m${baseRef}\x1b[0m`);
core.group('Result Changelog');
console.log(`changelog`);
core.startGroup('Result Changelog');
console.log(`${changelog}`);
core.endGroup();
core.setOutput('compareurl', `https://github.com/${owner}/${repo}/compare/${baseRef}...${tagRef || headRef}`);
core.setOutput('changelog', changelog);
Expand Down
5 changes: 2 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ async function run() {
}
let changelog = '';
for (const data of commits.data.commits) {
core.info(`Commit Data: \x1b[34m${JSON.stringify(data)}\x1b[0m`);
core.info(`Commit: \x1b[34m${data.commit.message}\x1b[0m \x1b[34m${data.commit.committer.name}\x1b[0m ${data.sha}`);
changelog += formatStringCommit(data.commit.message, `${owner}/${repo}`, {
regExp, shortHash: data.sha.slice(0, 7), filterAuthor, hash: data.sha, author: data.commit.committer.name
Expand All @@ -78,8 +77,8 @@ async function run() {
core.info(`Tag: \x1b[34m${tagRef || '-'}\x1b[0m`);
core.info(`Input head-ref: \x1b[34m${headRef}\x1b[0m`);
core.info(`Input base-ref: \x1b[34m${baseRef}\x1b[0m`);
core.group('Result Changelog');
console.log(`changelog`);
core.startGroup('Result Changelog');
console.log(`${changelog}`);
core.endGroup();
core.setOutput('compareurl', `https://github.com/${owner}/${repo}/compare/${baseRef}...${tagRef || headRef}`);
core.setOutput('changelog', changelog);
Expand Down

0 comments on commit d14930f

Please sign in to comment.