-
Notifications
You must be signed in to change notification settings - Fork 2k
36 lines (33 loc) · 1.18 KB
/
automation_labels.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
name: automation-labels
on:
pull_request_target:
types: [opened]
jobs:
automate-labels:
concurrency:
group: ${{ github.head_ref }}
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- name: Check organization
id: get_check_code
run: |
http_code=`curl -s --head -I -H "Authorization: token ${{ secrets.LABEl_TOKEN }}" -H "Accept: application/vnd.github.v3+json" https://api.github.com/orgs/cocos/members/${{ github.event.pull_request.user.login }} | awk '/HTTP/{print $2}'`
echo "::set-output name=http_code::${http_code}"
- name: Echo username organization
run: |
echo ${{ github.event.pull_request.user.login }}
echo ${{ steps.get_check_code.outputs.http_code }}
- name: Add contribution label
if: |
steps.get_check_code.outputs.http_code == 404
uses: OperationsYU/labeler@master
with:
add-labels: "contribution"
- name: assignment
if: |
steps.get_check_code.outputs.http_code == 404
uses: OperationsYU/auto-assignment@v1
with:
token: ${{ secrets.LABEl_TOKEN }}
users: '["holycanvas"]'