-
Notifications
You must be signed in to change notification settings - Fork 2k
38 lines (34 loc) · 1.76 KB
/
lighthouse-review-requested.yml
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
name: Lighthouse Review Requested
on:
pull_request:
types: [review_requested]
jobs:
add_review_label:
runs-on: ubuntu-latest
name: Add P2 labels and project
steps:
- name: Add label "Needs Review"
if: ${{ contains(github.event.pull_request.requested_teams.*.name, 'Lighthouse') }}
run: |
curl --request POST \
--url 'https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}/labels' \
--header 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \
--header 'Accept: application/vnd.github.v3+json' \
--data-raw '{"labels":["[Status] Needs Review"]}'
- name: Add author as assignee
if: ${{ contains(github.event.pull_request.requested_teams.*.name, 'Lighthouse') }}
run: |
curl --request PATCH \
--url 'https://api.github.com/repos/${{ github.repository }}/issues/${{ github.event.pull_request.number }}' \
--header 'Authorization: token ${{ secrets.GITHUB_TOKEN }}' \
--header 'Accept: application/vnd.github.v3+json' \
--data-raw '{"assignees": [ "${{ github.event.pull_request.user.login }}" ]}'
- name: Add to P2 project board
if: ${{ contains(github.event.pull_request.requested_teams.*.name, 'Lighthouse') }}
run: |
curl --request POST \
--url 'https://api.github.com/projects/columns/19237220/cards' \
--header 'Accept: application/vnd.github.inertia-preview+json' \
--header 'Authorization: token ${{ secrets.AUTOMATTIC_FINANCE }}' \
--header 'Content-Type: application/json; charset=utf-8' \
--data-raw '{"content_type": "PullRequest", "content_id": ${{ github.event.pull_request.id }}}'