Skip to content

Commit fe8a4f4

Browse files
committed
Add date to PR flow
1 parent 77c8bab commit fe8a4f4

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

.github/workflows/build-pr.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,17 +68,31 @@ 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+
year: 'numeric',
75+
month: 'long',
76+
day: 'numeric',
77+
hour: '2-digit',
78+
minute: '2-digit',
79+
second: '2-digit',
80+
hour12: true,
81+
timeZoneName: 'short'
82+
});
83+
7184
const commentBody = `
7285
### Temporary Branch Update
7386
7487
The temporary branch has been updated with the latest changes. Below are the details:
7588
7689
- **Branch Name**: [${branchName}](${branchUrl})
7790
- **Commit Hash**: [${commitHash}](${commitUrl})
91+
- **Last updated**: ${lastUpdatedDate}
7892
- **Install Command**: \`npm i github:duckduckgo/content-scope-scripts#${commitHash}\`
7993
8094
Please use the above install command to update to the latest version.
81-
`;
95+
`;
8296
core.setOutput('comment_body', commentBody);
8397
core.setOutput('pr_number', prNumber);
8498

0 commit comments

Comments
 (0)