@ada-support/web-storage 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
name: Notify Slack flag-cleanup channel on new "Vega" PR
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
types: [opened]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
pull-requests: write
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
check-title:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
if: contains(github.event.pull_request.title, '[Vega]')
|
|
14
|
+
steps:
|
|
15
|
+
- name: Build Slack payload
|
|
16
|
+
id: build-payload
|
|
17
|
+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
|
18
|
+
env:
|
|
19
|
+
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
20
|
+
PR_URL: ${{ github.event.pull_request.html_url }}
|
|
21
|
+
with:
|
|
22
|
+
script: |
|
|
23
|
+
const payload = {
|
|
24
|
+
text: `New flag cleanup PR opened by Vega: <${process.env.PR_URL}|${process.env.PR_TITLE}>`
|
|
25
|
+
};
|
|
26
|
+
core.setOutput('payload', JSON.stringify(payload));
|
|
27
|
+
|
|
28
|
+
- name: Send Slack notification
|
|
29
|
+
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
|
|
30
|
+
with:
|
|
31
|
+
webhook: ${{ secrets.SLACK_WEBHOOK_FLAG_CLEANUP }}
|
|
32
|
+
webhook-type: incoming-webhook
|
|
33
|
+
payload: ${{ steps.build-payload.outputs.payload }}
|
|
34
|
+
|
|
35
|
+
- name: Request review from flag-cleanup team
|
|
36
|
+
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
|
37
|
+
with:
|
|
38
|
+
github-token: ${{ secrets.FLAG_CLEANUP_PAT }}
|
|
39
|
+
script: |
|
|
40
|
+
await github.rest.pulls.requestReviewers({
|
|
41
|
+
owner: context.repo.owner,
|
|
42
|
+
repo: context.repo.repo,
|
|
43
|
+
pull_number: context.payload.pull_request.number,
|
|
44
|
+
team_reviewers: ['flag-cleanup']
|
|
45
|
+
});
|