Skip to content

Commit e9b3a6b

Browse files
zimegFil Maj
andauthored
feat!: wrap payloads to send to a "method" with "token" or "webhook" (#333)
Co-authored-by: Fil Maj <fmaj@slack-corp.com>
1 parent 74ae656 commit e9b3a6b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+5088
-7410
lines changed

.c8rc.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"include": ["src/*.js"],
3+
"exclude": ["**/*.spec.js"],
4+
"reporter": ["lcov", "text"],
5+
"all": false,
6+
"cache": true
7+
}

.eslintignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 132 deletions
This file was deleted.

.github/maintainers_guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ All you need to work with this project is a supported version of [Node.js](https
1313

1414
### Developing
1515

16-
Iterate quickly by developing and testing a local version of this action using `npm run local`.
17-
Information on setting up and configuring mocked events can be found in [`.github/workflows/local/README.md`](./workflows/local/README.md).
16+
Iterate quickly by developing and testing all techniques of this action with a local version of this action using `npm run dev`.
17+
Information on setting up and configuring mocked events can be found in [`.github/resources/README.md`](./resources/README.md).
1818

1919
### Testing
2020

.github/pull_request_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
### Summary
1+
### Summary
22

33
Describe the goal of this PR. Mention any related Issue numbers.
44

Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
{
22
"pull_request": {
3-
"user": {
4-
"login": "dependabot"
5-
},
63
"title": "Bump actions/checkout from 3 to 4",
74
"html_url": "https://github.com/slackapi/slack-github-action/pull/238"
5+
},
6+
"repository": {
7+
"full_name": "slackapi/slack-github-action"
8+
},
9+
"sender": {
10+
"login": "dependabot"
811
}
912
}

.github/resources/.env.example

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Move this file to .env before starting
2+
3+
# https://api.slack.com/apps/A0123456789
4+
export SLACK_BOT_TOKEN=xoxb-01010101-example
5+
export SLACK_CHANNEL_ID=C0123456789
6+
export SLACK_INCOMING_WEBHOOK=https://hooks.slack.com/services/T0123456789/B0123456789/abcdefghijklmnopqrstuvwxyz
7+
export SLACK_WEBHOOK_TRIGGER=https://hooks.slack.com/triggers/T0123456789/00000000000/abcdefghijklmnopqrstuvwxyz

.github/resources/.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Application values
2+
.env.*
3+
.env
4+
!.env.example
5+
.slack/apps.json
6+
.slack/apps.*.json
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"experiments": ["bolt"],
3+
"project_id": "c4805b41-d1ce-4ea0-b297-ed2f8c64c267"
4+
}
5+
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"text": ":email: A GitHub Action `${{ github.eventName }}` event status is ${{ env.JOB_STATUS }}",
3+
"attachments": [
4+
{
5+
"color": "${{ env.ATTACHMENT_COLOR }}",
6+
"fields": [
7+
{
8+
"title": "Repository",
9+
"short": false,
10+
"value": "<${{ github.payload.repository.html_url }}|${{ github.payload.repository.full_name }}>"
11+
},
12+
{
13+
"title": "Ref",
14+
"short": false,
15+
"value": "${{ github.ref }}"
16+
},
17+
{
18+
"title": "Commit",
19+
"short": false,
20+
"value": "<${{ github.payload.repository.html_url }}/commit/${{ github.sha }}|${{ github.sha }}>"
21+
},
22+
{
23+
"title": "Author",
24+
"short": false,
25+
"value": "<https://github.com/${{ github.actor }}|${{ github.actor }}>"
26+
},
27+
{
28+
"title": "Workflow",
29+
"short": false,
30+
"value": "<${{ github.payload.repository.html_url }}/actions/runs/${{ github.runId }}|${{ github.workflow }}>"
31+
}
32+
]
33+
}
34+
]
35+
}

0 commit comments

Comments
 (0)