Skip to content

Commit 3b3fa6a

Browse files
authored
Mention author in summary message (#55)
1 parent 15584ff commit 3b3fa6a

23 files changed

+923
-215
lines changed

.eslintrc.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"semi": "off",
3737
"@typescript-eslint/semi": ["error", "never"],
3838
"@typescript-eslint/type-annotation-spacing": "error",
39-
"filenames/match-regex": ["error", "^[a-z0-9-]+(.d|.config|.test)?$"]
39+
"filenames/match-regex": "off"
4040
},
4141
"env": {
4242
"node": true,

.github/workflows/check-dist.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,7 @@ jobs:
3232
run: npm ci
3333

3434
- name: Rebuild the dist/ directory
35-
run: |
36-
npm run build
37-
npm run package
35+
run: npm run build
3836

3937
- name: Compare the expected and actual dist/ directories
4038
run: |

.vscode/settings.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
{
2-
"cSpell.words": ["endregion", "Fieldguide", "mrkdwn", "namoscato"],
2+
"cSpell.words": [
3+
"endregion",
4+
"Fieldguide",
5+
"mrkdwn",
6+
"namoscato",
7+
"USLACKBOT"
8+
],
39
"files.exclude": {
410
"dist": true,
511
"lib": true

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,26 @@ Post [GitHub Action](https://github.com/features/actions) deploy workflow progre
66

77
<br />
88

9-
<img width="482" alt="Slack Deploy Pipeline Notifications example thread" src="https://user-images.githubusercontent.com/847532/196043237-bf16fcf7-ff45-443b-a3b2-ec3d51f17ee5.jpg">
9+
<img width="524" alt="Slack Deploy Pipeline Notifications example thread" src="https://user-images.githubusercontent.com/847532/230737887-1d18a062-af7f-4c7f-a78c-e604fc9803c2.jpg">
1010

1111
## Features
1212

1313
- Posts summary message at beginning of the deploy workflow, surfacing commit message and author
14+
- Maps GitHub commit author to Slack user by full name, mentioning them in the summary message
1415
- Threads intermediate stage completions, sending unexpected failures back to the channel
1516
- Updates summary message duration at conclusion of the workflow
16-
- Supports `pull_request`, `push`, and `schedule` [event types](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)
17+
- Supports `pull_request`, `push`, `schedule`, and `workflow_dispatch` [event types](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)
1718

1819
## Setup
1920

2021
1. [Create a Slack App](https://api.slack.com/apps) for your workspace
2122
1. Under **OAuth & Permissions**, add two Bot Token Scopes:
2223
1. [`chat:write`](https://api.slack.com/scopes/chat:write) to post messages
23-
1. [`chat:write.customize`](https://api.slack.com/scopes/chat:write.customize) to customize messages with GitHub username and avatar
24+
1. [`chat:write.customize`](https://api.slack.com/scopes/chat:write.customize) to customize messages with GitHub commit author
25+
1. [`users:read`](https://api.slack.com/scopes/users:read) to map GitHub user to Slack user
2426
1. Install the app to your workspace
2527
1. Copy the app's **Bot User OAuth Token** from the **OAuth & Permissions** page
26-
1. [Create a GitHub repository secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets#creating-encrypted-secrets-for-a-repository) with this token, named `SLACK_DEPLOY_BOT_TOKEN`
28+
1. [Create a GitHub secret](https://docs.github.com/en/actions/security-guides/encrypted-secrets) with this token, named `SLACK_DEPLOY_BOT_TOKEN`
2729
1. Invite the bot user into the Slack channel you will post messages to (`/invite @bot_user_name`)
2830
1. Click the Slack channel name in the header, and copy its **Channel ID** from the bottom of the dialog
2931

0 commit comments

Comments
 (0)