-
Notifications
You must be signed in to change notification settings - Fork 147
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat!: wrap payloads to send to a "method" with "token" or "webhook" #333
base: main
Are you sure you want to change the base?
Changes from 73 commits
959992e
82bbd29
c8916a0
efe707e
c2d4e9c
1da745b
09a1d45
b8e82b8
962e0db
dbdbf9f
a10e1f7
9fb3e9e
57ab9a4
6ca6013
5875c61
5b4b7b8
ee9e200
4c57022
72734a9
4fa18f2
32c4ddb
5ffcbc8
0d8d929
e7f7020
7f42936
78e74e6
31b6ed1
5f3b855
bc9c18b
8c35f78
b1453da
518946d
1a77eed
eea2eb1
38b6f1e
e3f0238
7aee130
abda089
6b14b32
23913a6
92fd8d8
856cb18
3d0eb1e
28dee88
a9b40ba
29c7ea6
1a8d212
01ca583
b88b87a
6f23616
815c519
8003d03
19c1ee5
ecb8404
0777d30
574e5f9
a10a047
3abfdb6
7c719bb
7165edc
504fb31
72d552d
9645097
84c034a
67471c1
c711234
4c6260b
1b4979e
48d4ccf
16ea7d7
05b1c7c
8618c4d
8066bf9
103ae85
be37553
75d7165
bc887ca
90d5d06
12e1625
c3a19f3
e909226
a2b32d6
6075734
8be2d3a
fa91f44
540f02d
c21fea2
a8affaa
2133481
fd5313b
da7d2a1
7816a2c
ad5d399
a7dc253
23838b2
aab5451
aceca25
b773f12
e0e254b
e37146c
9df54bb
e80e77b
99dd6aa
ac9a37e
f19da83
9bc0ad9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
{ | ||
"include": ["src/*.js"], | ||
"exclude": ["**/*.spec.js"], | ||
"reporter": ["lcov", "text"], | ||
"all": false, | ||
"cache": true | ||
} |
This file was deleted.
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
### Summary | ||
### Summary | ||
|
||
Describe the goal of this PR. Mention any related Issue numbers. | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,12 @@ | ||
{ | ||
"pull_request": { | ||
"user": { | ||
"login": "dependabot" | ||
}, | ||
"title": "Bump actions/checkout from 3 to 4", | ||
"html_url": "https://github.com/slackapi/slack-github-action/pull/238" | ||
}, | ||
"repository": { | ||
"full_name": "slackapi/slack-github-action" | ||
}, | ||
"sender": { | ||
"login": "dependabot" | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Application values | ||
!.env.example | ||
.env | ||
.env.* | ||
.slack/apps.json | ||
.slack/apps.*.json |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"experiments": ["bolt"], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This part of the PR might be worth separate discussion, although I find it so useful to include here as a part of testing. IMO it's alright to be using experimental features (perhaps helpful for finding edges of experiments) but I realize too that this might be opinionated β‘ |
||
"project_id": "c4805b41-d1ce-4ea0-b297-ed2f8c64c267" | ||
} | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. π·οΈ These are mostly the same, though reformatted and with some |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
{ | ||
"text": ":email: A GitHub Action `${{ github.eventName }}` event status is ${{ env.JOB_STATUS }}", | ||
"attachments": [ | ||
{ | ||
"color": "${{ env.ATTACHMENT_COLOR }}", | ||
"fields": [ | ||
{ | ||
"title": "Repository", | ||
"short": false, | ||
"value": "<${{ github.payload.repository.html_url }}|${{ github.payload.repository.full_name }}>" | ||
}, | ||
{ | ||
"title": "Ref", | ||
"short": false, | ||
"value": "${{ github.ref }}" | ||
}, | ||
{ | ||
"title": "Commit", | ||
"short": false, | ||
"value": "<${{ github.payload.repository.html_url }}/commit/${{ github.sha }}|${{ github.sha }}>" | ||
}, | ||
{ | ||
"title": "Author", | ||
"short": false, | ||
"value": "<https://github.com/${{ github.actor }}|${{ github.actor }}>" | ||
}, | ||
{ | ||
"title": "Workflow", | ||
"short": false, | ||
"value": "<${{ github.payload.repository.html_url }}/actions/runs/${{ github.runId }}|${{ github.workflow }}>" | ||
} | ||
] | ||
} | ||
] | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{ | ||
"_metadata": { | ||
"major_version": 2 | ||
}, | ||
"display_information": { | ||
"name": "slacktion", | ||
"description": "an application for developing the Slack GitHub Action" | ||
}, | ||
"features": { | ||
"app_home": { | ||
"messages_tab_enabled": true, | ||
"messages_tab_read_only_enabled": true | ||
}, | ||
"bot_user": { | ||
"display_name": "slacktion" | ||
} | ||
}, | ||
"oauth_config": { | ||
"scopes": { | ||
"bot": [ | ||
"chat:write", | ||
"chat:write.public", | ||
"files:write", | ||
"incoming-webhook", | ||
"reactions:write" | ||
] | ||
} | ||
}, | ||
"settings": { | ||
"org_deploy_enabled": true, | ||
"incoming_webhooks": { | ||
"incoming_webhooks_enabled": true | ||
} | ||
}, | ||
Comment on lines
+29
to
+34
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This combination is so interesting to me, but also required for this app. The Tagging the wise @WilliamBergamin here for awareness! Both features work well when this is installed to a standalone workspace, but IIRC something strange might happen elsewhere π |
||
"workflows": { | ||
"event_notifications": { | ||
"title": "GitHub event notifications", | ||
"description": "A new changeset has been discovered", | ||
"input_parameters": { | ||
"properties": { | ||
"author": { | ||
"type": "string" | ||
}, | ||
"channel_id": { | ||
"type": "slack#/types/channel_id" | ||
}, | ||
"repo_name": { | ||
"type": "string" | ||
}, | ||
"status": { | ||
"type": "string" | ||
}, | ||
"event_url": { | ||
"type": "string" | ||
} | ||
}, | ||
"required": ["author", "channel_id", "repo_name", "status", "event_url"] | ||
}, | ||
"steps": [ | ||
{ | ||
"id": "0", | ||
"function_id": "slack#/functions/send_message", | ||
"inputs": { | ||
"channel_id": "{{inputs.channel_id}}", | ||
"message": ":ship: {{inputs.repo_name}}(@{{inputs.author}}): `{{inputs.status}}` <{{inputs.event_url}}|Check it out here>!" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"type": "webhook", | ||
"name": "Post the latest actions from GitHub", | ||
"description": "Share event information to a channel", | ||
"workflow": "#/workflows/event_notifications", | ||
"inputs": { | ||
"author": { | ||
"value": "{{data.author}}" | ||
}, | ||
"channel_id": { | ||
"value": "{{data.channel_id}}" | ||
}, | ||
"repo_name": { | ||
"value": "{{data.repo_name}}" | ||
}, | ||
"status": { | ||
"value": "{{data.status}}" | ||
}, | ||
"event_url": { | ||
"value": "{{data.event_url}}" | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This goes against current recommendations, but I'm struggling to commit these values here π³
I'm instead super interested in exploring ways to share app IDs between collaborators without using this file. Right now that's not so quick, but we do have a command to help for the app ID we do know!