-
Notifications
You must be signed in to change notification settings - Fork 59
37 lines (32 loc) · 1.17 KB
/
workflow-review.yml
File metadata and controls
37 lines (32 loc) · 1.17 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
# https://stackoverflow.com/questions/67247752/how-to-use-secret-in-pull-request-review-similar-to-pull-request-target
name: Dummy Workflow on review
on:
pull_request_review:
types: [submitted, edited]
permissions:
pull-requests: write
contents: write
issues: write
jobs:
dummy-workflow:
if: |
github.event.pull_request != '' &&
!contains(github.event.sender.login, 'coderabbitai[bot]')
runs-on: ubuntu-latest
steps:
- name: save the pr information
run: |
printf '{
"pr_num": "${{ github.event.pull_request.number || github.event.issue.number }}",
"event_action": "${{ github.event.action }}",
"review_state": "${{ github.event.review.state }}",
"event_name": "${{ github.event_name }}",
"comment_body": "${{ github.event.comment.body }}",
"review_comment_body": "${{ github.event.review.body }}",
"user_login": "${{ github.event.sender.login }}",
"action": "add-remove-labels"
}' >> context.json
- uses: actions/upload-artifact@v5
with:
name: context.json
path: ./