Skip to content

Commit 2ace5ec

Browse files
authored
Add GitHub Actions workflow for Docathon label sync
1 parent a36547c commit 2ace5ec

1 file changed

Lines changed: 31 additions & 0 deletions

File tree

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Docathon Labels Sync
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize, edited]
6+
branches: [main]
7+
8+
jobs:
9+
check-labels:
10+
if: github.repository_owner == 'pytorch'
11+
runs-on: ubuntu-latest
12+
permissions:
13+
issues: write
14+
pull-requests: write
15+
steps:
16+
- name: Check out the repo
17+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
18+
with:
19+
fetch-depth: 1
20+
- name: Set up Python
21+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
22+
with:
23+
python-version: 3.x
24+
- name: Install dependencies
25+
run: |
26+
pip install requests==2.32.3
27+
pip install PyGithub==2.3.0
28+
- name: Run Python script
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
run: python ./.github/scripts/docathon-label-sync.py ${{ github.event.pull_request.number }}

0 commit comments

Comments
 (0)