Skip to content

Commit b710e53

Browse files
authored
πŸ’¬ action run / end 둜 λͺ…μ‹œ (#106)
μ—„λ°€νžˆλŠ” 배포 μ™„λ£Œκ°€ μ•„λ‹ˆλ―€λ‘œ λ³€κ²½ν•©λ‹ˆλ‹€.
1 parent cb496b3 commit b710e53

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

β€Žsrc/main.test.tsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,7 @@ describe('github webhook endpoint', () => {
387387
expect(deps.slackClient.postMessage).toBeCalledTimes(1);
388388
expect(deps.slackClient.postMessage).toBeCalledWith({
389389
channel: env.deployWatcherChannelId,
390-
text: `:wip: deployment started :point_right: <${workflowStartBody.workflow_run.html_url}|${workflowStartBody.workflow_run.id}>`,
390+
text: `:github: :wip: workflow started <${workflowStartBody.workflow_run.html_url}|${workflowStartBody.workflow_run.id}>`,
391391
thread_ts: mockTs,
392392
});
393393

@@ -400,7 +400,7 @@ describe('github webhook endpoint', () => {
400400
expect(deps.slackClient.postMessage).toBeCalledTimes(1);
401401
expect(deps.slackClient.postMessage).toBeCalledWith({
402402
channel: env.deployWatcherChannelId,
403-
text: `:tada: deployment completed <${workflowEndBody.workflow_run.html_url}|${workflowEndBody.workflow_run.id}>`,
403+
text: `:github: :done: workflow completed <${workflowEndBody.workflow_run.html_url}|${workflowEndBody.workflow_run.id}>`,
404404
thread_ts: mockTs,
405405
});
406406
});

β€Žsrc/presenters/MessengerPresenter.tsβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,5 @@ type SupportedEmoji =
3131
| 'point_right'
3232
| 'blob-clap'
3333
| 'github'
34-
| 'memo';
34+
| 'memo'
35+
| 'done';

β€Žsrc/services/GithubDeploymentService.tsβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export const implementDeploymentService = ({
7575

7676
await messengerPresenter.sendMessage(({ formatEmoji, formatLink }) => ({
7777
text: [
78-
`${formatEmoji('wip')} deployment started ${formatEmoji('point_right')} ${formatLink(
78+
`${formatEmoji('github')} ${formatEmoji('wip')} workflow started ${formatLink(
7979
`${workflowId}`,
8080
{
8181
url: workflowUrl,
@@ -93,7 +93,7 @@ export const implementDeploymentService = ({
9393

9494
await messengerPresenter.sendMessage(({ formatEmoji, formatLink }) => ({
9595
text: [
96-
`${formatEmoji('tada')} deployment completed ${formatLink(`${workflowId}`, { url: workflowUrl })}`,
96+
`${formatEmoji('github')} ${formatEmoji('done')} workflow completed ${formatLink(`${workflowId}`, { url: workflowUrl })}`,
9797
].join('\n'),
9898
options: { ts },
9999
}));

0 commit comments

Comments
Β (0)