Skip to content

Commit 2fc7951

Browse files
authored
add approval workflow (#2432)
1 parent 2807f56 commit 2fc7951

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Send PR Approval Status
2+
3+
permissions:
4+
contents: read
5+
pull-requests: write
6+
7+
on:
8+
pull_request:
9+
branches:
10+
- v2
11+
types: ["review_requested", "synchronize", "opened", "reopened"]
12+
pull_request_review:
13+
types:
14+
- submitted
15+
- dismissed
16+
17+
jobs:
18+
send_status:
19+
runs-on: ubuntu-latest
20+
if: >
21+
github.event.pull_request.draft == false &&
22+
!contains(github.event.pull_request.labels.*.name, 'ci/skip') &&
23+
!contains(github.event.pull_request.head.ref, 'datadog-api-spec/test/') &&
24+
contains(github.event.pull_request.head.ref, 'datadog-api-spec/generated')
25+
steps:
26+
- name: Get GitHub App token
27+
id: get_token
28+
uses: actions/create-github-app-token@v1
29+
with:
30+
app-id: ${{ secrets.PIPELINE_GITHUB_APP_ID }}
31+
private-key: ${{ secrets.PIPELINE_GITHUB_APP_PRIVATE_KEY }}
32+
repositories: datadog-api-spec
33+
- name: Post PR review status check
34+
uses: DataDog/github-actions/post-review-status@65b4875f33ad773d7ba4b005a2cb5f35020295f3
35+
with:
36+
github-token: ${{ steps.get_token.outputs.token }}
37+
repo: datadog-api-spec
38+
context: datadog-api-client-typescript/${{ github.event.pull_request.base.ref }}

0 commit comments

Comments
 (0)