-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (36 loc) · 1.28 KB
/
ack-fork-pr.yml
File metadata and controls
41 lines (36 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: ack fork pr
concurrency: staging
on:
pull_request_target:
branches:
- 'main'
permissions:
pull-requests: write
jobs:
comment-on-pr:
# this workflow should only run on forks targeting the original repo
if: |
github.repository == 'lexical-cloud/lexical-cloud-data-hugo' &&
github.event.pull_request.head.repo.fork == true
runs-on: ubuntu-22.04
steps:
- uses: actions/github-script@v6
env:
PR_NUM: ${{ github.event.pull_request.number }}
RUN_NUM: ${{ github.run_number }}
with:
script: |
const { PR_NUM, RUN_NUM } = process.env
github.rest.issues.createComment({
issue_number: PR_NUM,
owner: context.repo.owner,
repo: context.repo.repo,
body: `
### Changes in PR of this forked repo require approval.
_(run ${RUN_NUM} of comment-on-pr in ack-fork-pr workflow)_
@lexical-cloud/admins will perform the following actions:
- [ ] Review the proposed changes.
- [ ] Decide whether to proceed with the build.
- [ ] If accepting, approve and monitor the build run.
Expect a response on this comment when actions are completed.`
})