Skip to content

Commit

Permalink
last commit link
Browse files Browse the repository at this point in the history
  • Loading branch information
StashBank committed Nov 6, 2024
1 parent 9173a34 commit 4b5e05e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27162,9 +27162,9 @@ var createJobSummary = async ({ appName, repoName, orgName, version_url, context
[{ data: "Application" }, { data: appName }],
[{ data: "Project" }, { data: repoName }],
[{ data: "Organization" }, { data: orgName }],
[{ data: "Last commit" }, { data: lastCommit.id }],
[{ data: "Last commit message" }, { data: lastCommit.message }],
[{ data: "Last commit" }, { data: `<a href="https://github.com/${orgName}/${repoName}/commit/${lastCommit.id}">${lastCommit.id}</a>` }],
[{ data: "Last commit author" }, { data: `@${lastCommit.author.username}` }],
[{ data: "Last commit message" }, { data: lastCommit.message }],
[{ data: "Version URL" }, { data: `<a class="external" href=${version_url} target="_blank">${version_url}</a>` }]
];
await import_core.summary.addTable(tableData).write();
Expand Down
5 changes: 3 additions & 2 deletions src/create-job-summary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ export const createJobSummary = async ({appName, repoName, orgName, version_url,
await summary.addRaw(`Deployed ${appName}!`);
await summary.addEOL();
const lastCommit = getLastCommit(context);

const tableData = [
[{ data: 'Application'}, { data: appName}],
[{ data: 'Project'}, { data: repoName}],
[{ data: 'Organization'}, { data: orgName}],
[{ data: 'Last commit'}, { data: lastCommit.id}],
[{ data: 'Last commit message'}, { data: lastCommit.message}],
[{ data: 'Last commit'}, { data: `<a href="https://github.com/${orgName}/${repoName}/commit/${lastCommit.id}">${lastCommit.id}</a>`}],
[{ data: 'Last commit author'}, { data: `@${lastCommit.author.username}` }],
[{ data: 'Last commit message'}, { data: lastCommit.message}],
[{ data: 'Version URL' }, { data: `<a class="external" href=${version_url} target="_blank">${version_url}</a>` }],
]
await summary.addTable(tableData).write();
Expand Down

0 comments on commit 4b5e05e

Please sign in to comment.