mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-21 08:02:39 +08:00
f9167409ba
* feat(security): prevent RCE in various workflows * Revert web-interface-check.yml, will update it in another PR. --------- Co-authored-by: RedYetiDev <38299977+RedYetiDev@users.noreply.github.com>
35 lines
1.0 KiB
YAML
35 lines
1.0 KiB
YAML
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
|
|
env:
|
|
user: ${{ github.event.pull_request.user.login }}
|
|
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/$user | awk '/HTTP/{print $2}'`
|
|
echo "::set-output name=http_code::${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: '["minggo"]'
|