Skip to content

Commit 9e20959

Browse files
authored
Adds last updated date to PR build-and-release comment (#1563)
1 parent 1b0271c commit 9e20959

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/build-pr.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,25 @@ jobs:
6868
const repoUrl = `https://github.com/${context.repo.owner}/${context.repo.repo}`;
6969
const branchUrl = `${repoUrl}/tree/${branchName}`;
7070
const commitUrl = `${repoUrl}/commit/${commitHash}`;
71+
72+
// Get the current date
73+
const lastUpdatedDate = (new Date()).toLocaleString('en-US', {
74+
dateStyle: 'long',
75+
timeStyle: 'long'
76+
});
77+
7178
const commentBody = `
7279
### Temporary Branch Update
7380
7481
The temporary branch has been updated with the latest changes. Below are the details:
7582
7683
- **Branch Name**: [${branchName}](${branchUrl})
7784
- **Commit Hash**: [${commitHash}](${commitUrl})
85+
- **Last Updated**: ${lastUpdatedDate}
7886
- **Install Command**: \`npm i github:duckduckgo/content-scope-scripts#${commitHash}\`
7987
8088
Please use the above install command to update to the latest version.
81-
`;
89+
`;
8290
core.setOutput('comment_body', commentBody);
8391
core.setOutput('pr_number', prNumber);
8492

0 commit comments

Comments
 (0)