-
Notifications
You must be signed in to change notification settings - Fork 149
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: wrap payloads to send to a "method" with "token" or "webhook" (#…
…333) Co-authored-by: Fil Maj <[email protected]>
- Loading branch information
Showing
60 changed files
with
5,088 additions
and
7,410 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. | ||
|
||
|
9 changes: 6 additions & 3 deletions
9
.github/workflows/local/event.json → .github/resources/.actions/event.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Move this file to .env before starting | ||
|
||
# https://api.slack.com/apps/A0123456789 | ||
export SLACK_BOT_TOKEN=xoxb-01010101-example | ||
export SLACK_CHANNEL_ID=C0123456789 | ||
export SLACK_INCOMING_WEBHOOK=https://hooks.slack.com/services/T0123456789/B0123456789/abcdefghijklmnopqrstuvwxyz | ||
export SLACK_WEBHOOK_TRIGGER=https://hooks.slack.com/triggers/T0123456789/00000000000/abcdefghijklmnopqrstuvwxyz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Application values | ||
.env.* | ||
.env | ||
!.env.example | ||
.slack/apps.json | ||
.slack/apps.*.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"experiments": ["bolt"], | ||
"project_id": "c4805b41-d1ce-4ea0-b297-ed2f8c64c267" | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }}>" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
}, | ||
"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>!" | ||
} | ||
} | ||
] | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}}" | ||
} | ||
} | ||
} |
Oops, something went wrong.