Skip to content

Commit 9d6edc7

Browse files
stepankuzmingithub-actions[bot]
authored andcommitted
Set up GL JS sync #4957
GitOrigin-RevId: 6263f4880975d1d11e3f49831118cd8827cee43e
1 parent 5ef3fe0 commit 9d6edc7

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/pr-notify.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: PR notify
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, reopened, edited]
6+
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.head_ref }}
9+
cancel-in-progress: true
10+
11+
jobs:
12+
notify:
13+
runs-on: ubuntu-latest
14+
if: |
15+
github.event.pull_request.draft == false &&
16+
github.repository == 'mapbox/mapbox-gl-js' &&
17+
github.event.pull_request.base.ref == github.event.repository.default_branch
18+
steps:
19+
- name: Setup GH writer-private token
20+
uses: mapbox/setup-github-tokens@v2.0.1
21+
with:
22+
scope-type: 'writer'
23+
repo-type: 'private'
24+
25+
- name: Notify upstream
26+
uses: actions/github-script@v7
27+
with:
28+
github-token: ${{ env.GITHUB_WRITER_PRIVATE_TOKEN }}
29+
script: |
30+
await github.rest.actions.createWorkflowDispatch({
31+
owner: 'mapbox',
32+
repo: 'mapbox-sdk',
33+
workflow_id: 'gl-js-import-public-pr.yml',
34+
ref: 'main',
35+
inputs: {
36+
pr_number: '${{ github.event.pull_request.number }}'
37+
}
38+
});

0 commit comments

Comments
 (0)