-
Notifications
You must be signed in to change notification settings - Fork 710
38 lines (37 loc) · 1.64 KB
/
holopin.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: Holopin
on:
pull_request_target:
types:
- closed
- labeled
jobs:
issue_lava_lamp_holobyte:
name: Issue Lava Lamp Holobyte
runs-on: ubuntu-22.04
if: ${{ github.event.pull_request.merged }}
steps:
- id: check_if_contributor_is_external
name: Check if contributor is external
run: 'curl --write-out ''%{http_code}'' --silent --output /dev/null -L -H "Accept: application/vnd.github+json" -H "Authorization: Bearer ${{ env.GH_TOKEN }}" -H "X-GitHub-Api-Version: 2022-11-28" https://api.github.com/orgs/cloudflare/members/${{ github.event.pull_request.user.login }} | grep -q ''204'' && echo "is_external=false" >> $GITHUB_OUTPUT || echo "is_external=true" >> $GITHUB_OUTPUT'
env:
GH_TOKEN: ${{ secrets.HOLOPIN_LABELER }}
- name: Issue Lava Lamp Holobyte
run: gh pr edit "$NUMBER" --add-label "$LABELS"
if: steps.check_if_contributor_is_external.outputs.is_external == 'true'
env:
GH_TOKEN: ${{ secrets.HOLOPIN_LABELER }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.pull_request.number }}
LABELS: contribution
issue_global_contribution_badge:
name: Issue Global Contribution badge
runs-on: ubuntu-22.04
if: github.event.label.name == 'outstanding contribution'
steps:
- name: Issue Global Contribution badge
run: gh pr edit "$NUMBER" --add-label "$LABELS"
env:
GH_TOKEN: ${{ secrets.HOLOPIN_LABELER }}
GH_REPO: ${{ github.repository }}
NUMBER: ${{ github.event.pull_request.number }}
LABELS: "[automation] outstanding contribution"