Skip to content

Commit 2ccf882

Browse files
authored
Merge pull request #6 from ZephyrCloudIO/fix-summary
feat: remove last commit information
2 parents 702996a + 76ac589 commit 2ccf882

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

src/create-job-summary.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,25 +12,16 @@ export interface CreateJobSummaryParams {
1212
export const createJobSummary = async ({appName, repoName, orgName, version_url, context}: CreateJobSummaryParams) => {
1313
await summary.addRaw(`Deployed ${appName}!`);
1414
await summary.addEOL();
15-
const lastCommit = getLastCommit(context);
1615

1716
const tableData = [
1817
[{ data: 'Application'}, { data: appName}],
1918
[{ data: 'Project'}, { data: repoName}],
2019
[{ data: 'Organization'}, { data: orgName}],
21-
[{ data: 'Last commit'}, { data: `<a href="https://github.com/${orgName}/${repoName}/commit/${lastCommit.id}">${lastCommit.id}</a>`}],
22-
[{ data: 'Last commit author'}, { data: `@${lastCommit.author.username}` }],
23-
[{ data: 'Last commit message'}, { data: lastCommit.message}],
2420
[{ data: 'Version URL' }, { data: `<a class="external" href=${version_url} target="_blank">${version_url}</a>` }],
2521
]
2622
await summary.addTable(tableData).write();
2723
};
2824

29-
function getLastCommit(context: Context) {
30-
const payload = context.payload;
31-
return payload.head_commit as Commit;
32-
}
33-
3425
interface Commit {
3526
author: {
3627
name: string;
@@ -45,4 +36,4 @@ interface Commit {
4536
message: string;
4637
id: string;
4738
timestamp: string;
48-
}
39+
}

0 commit comments

Comments
 (0)