Skip to content

Commit d6429a0

Browse files
committed
add a timestamp to message updates
1 parent b62bbd1 commit d6429a0

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

dist/index.js

Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/functions/deployment-confirmation.js

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import * as core from '@actions/core'
22
import dedent from 'dedent-js'
33
import {COLORS} from './colors'
44
import {API_HEADERS} from './api-headers'
5+
import {timestamp} from './timestamp'
56

67
const thumbsUp = '+1'
78
const thumbsDown = '-1'
@@ -105,7 +106,7 @@ export async function deploymentConfirmation(context, octokit, data) {
105106
await octokit.rest.issues.updateComment({
106107
...context.repo,
107108
comment_id: commentId,
108-
body: `${message}\n\n✅ Deployment confirmed by __${context.actor}__.`,
109+
body: `${message}\n\n✅ Deployment confirmed by __${context.actor}__ at \`${timestamp()}\`.`,
109110
headers: API_HEADERS
110111
})
111112

@@ -119,7 +120,7 @@ export async function deploymentConfirmation(context, octokit, data) {
119120
await octokit.rest.issues.updateComment({
120121
...context.repo,
121122
comment_id: commentId,
122-
body: `${message}\n\n❌ Deployment rejected by __${context.actor}__.`,
123+
body: `${message}\n\n❌ Deployment rejected by __${context.actor}__ at \`${timestamp()}\`.`,
123124
headers: API_HEADERS
124125
})
125126

@@ -152,7 +153,7 @@ export async function deploymentConfirmation(context, octokit, data) {
152153
await octokit.rest.issues.updateComment({
153154
...context.repo,
154155
comment_id: commentId,
155-
body: `${message}\n\n⏱️ Deployment confirmation timed out after \`${data.deployment_confirmation_timeout}\` seconds. The deployment request has been rejected.`,
156+
body: `${message}\n\n⏱️ Deployment confirmation timed out after \`${data.deployment_confirmation_timeout}\` seconds. The deployment request has been rejected at \`${timestamp()}\`.`,
156157
headers: API_HEADERS
157158
})
158159

0 commit comments

Comments
 (0)