Skip to content

Commit 80f7c50

Browse files
authored
Slack merge reaction (#28)
* clean up merge reaction * Use centralized slack-merge-reaction workflow from docs-automation with manual testing
1 parent 7bc2337 commit 80f7c50

File tree

1 file changed

+16
-5
lines changed

1 file changed

+16
-5
lines changed

.github/workflows/slack-merge-reaction.yml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,27 @@ name: Add Slack Merge Reaction
33
on:
44
pull_request:
55
types: [closed]
6+
# Manual trigger for testing
7+
workflow_dispatch:
8+
inputs:
9+
pr_url:
10+
description: 'PR URL to test (e.g., https://github.com/digitalocean/vale-package/pull/123)'
11+
required: true
12+
type: string
13+
pr_number:
14+
description: 'PR number'
15+
required: true
16+
type: string
617

718
jobs:
819
add-merge-reaction:
9-
if: github.event.pull_request.merged == true
20+
if: github.event.pull_request.merged == true || github.event_name == 'workflow_dispatch'
1021
uses: digitalocean/docs-automation/.github/workflows/slack-merge-reaction.yml@main
1122
with:
12-
pr_url: ${{ github.event.pull_request.html_url }}
13-
pr_number: ${{ github.event.pull_request.number }}
14-
merged_by: ${{ github.event.pull_request.merged_by.login }}
15-
merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha }}
23+
pr_url: ${{ inputs.pr_url || github.event.pull_request.html_url }}
24+
pr_number: ${{ inputs.pr_number || github.event.pull_request.number }}
25+
merged_by: ${{ github.event.pull_request.merged_by.login || 'manual-test' }}
26+
merge_commit_sha: ${{ github.event.pull_request.merge_commit_sha || 'manual-test' }}
1627
secrets:
1728
SLACK_BOT_TOKEN: ${{ secrets.PDOCS_SLACK_BOT_TOKEN }}
1829
SLACK_CHANNEL_ID: ${{ secrets.PDOCS_SLACK_CHANNEL_ID }}

0 commit comments

Comments
 (0)