forked from pytorch/pytorch
38 lines (31 loc) · 945 Bytes
/
pr-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
37
38
name: pr-labels
on:
push:
branches:
- master
- main
jobs:
is-properly-labeled:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up python
uses: actions/setup-python@v4
with:
python-version: '3.10'
check-latest: false
cache: pip
cache-dependency-path: |
**/.github/requirements-gha-cache.txt
- name: Install requests
run: pip install requests==2.26
- name: Process commit and find merger responsible for labeling
id: commit
env:
SHA1: ${{ github.sha }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: python .github/scripts/process_commit.py "${SHA1}"
concurrency:
group: pr-labels-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name == 'workflow_dispatch' }}
cancel-in-progress: true