Skip to content

Commit

Permalink
fix: Fix to get sort commit content.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Jan 7, 2021
1 parent af33bd4 commit c517b16
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,11 @@ async function run() {
}
let changelog = '';
for (const data of commits.data.commits) {
core.startGroup(`Commit: \x1b[34m${data.commit.message}\x1b[0m \x1b[34m${data.commit.author.name}\x1b[0m ${data.sha}`);
const message = commits.data.commits.split('\n\n')[0];
core.startGroup(`Commit: \x1b[34m${message}\x1b[0m \x1b[34m${data.commit.author.name}\x1b[0m ${data.sha}`);
core.info(`${JSON.stringify(data, null, 2)}`);
core.endGroup();
changelog += formatStringCommit(data.commit.message, `${owner}/${repo}`, {
changelog += formatStringCommit(message, `${owner}/${repo}`, {
regExp, shortHash: data.sha.slice(0, 7), filterAuthor, hash: data.sha, author: data.commit.author.name
});
}
Expand Down
5 changes: 3 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,11 @@ async function run() {
}
let changelog = '';
for (const data of commits.data.commits) {
core.startGroup(`Commit: \x1b[34m${data.commit.message}\x1b[0m \x1b[34m${data.commit.author.name}\x1b[0m ${data.sha}`);
const message = commits.data.commits.split('\n\n')[0];
core.startGroup(`Commit: \x1b[34m${message}\x1b[0m \x1b[34m${data.commit.author.name}\x1b[0m ${data.sha}`);
core.info(`${JSON.stringify(data, null, 2)}`);
core.endGroup();
changelog += formatStringCommit(data.commit.message, `${owner}/${repo}`, {
changelog += formatStringCommit(message, `${owner}/${repo}`, {
regExp, shortHash: data.sha.slice(0, 7), filterAuthor, hash: data.sha, author: data.commit.author.name
});
}
Expand Down

0 comments on commit c517b16

Please sign in to comment.