Skip to content

Commit

Permalink
chore: fix get author errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jan 6, 2021
1 parent f0f902b commit 92c4b21
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ 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.committer.name}\x1b[0m ${data.sha}`);
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.committer.name
regExp, shortHash: data.sha.slice(0, 7), filterAuthor, hash: data.sha, author: data.commit.committer.name
});
}

Expand All @@ -86,7 +86,7 @@ async function run() {
core.info(`Input head-ref: \x1b[34m${headRef}\x1b[0m`);
core.info(`Input base-ref: \x1b[34m${baseRef}\x1b[0m`);
core.group('Result Changelog');
core.info(`\x1b[34m${changelog}\x1b[0m`);
console.log(`changelog`);
core.endGroup();
core.setOutput('compareurl', `https://github.com/${owner}/${repo}/compare/${baseRef}...${tagRef || headRef}`);
core.setOutput('changelog', changelog);
Expand Down
6 changes: 3 additions & 3 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ 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.committer.name}\x1b[0m ${data.sha}`);
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.committer.name
regExp, shortHash: data.sha.slice(0, 7), filterAuthor, hash: data.sha, author: data.commit.committer.name
});
}

Expand All @@ -79,7 +79,7 @@ async function run() {
core.info(`Input head-ref: \x1b[34m${headRef}\x1b[0m`);
core.info(`Input base-ref: \x1b[34m${baseRef}\x1b[0m`);
core.group('Result Changelog');
core.info(`\x1b[34m${changelog}\x1b[0m`);
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 92c4b21

Please sign in to comment.