Spaces:
Build error
Build error
Download src/python-doctr/.github/workflows/pr-labels.yml from MikeTrizna/doctr_demo_fork: direct link, hf CLI and curl.
- Browser
- Download file 1.2 kB
-
https://huggingface.co/spaces/MikeTrizna/doctr_demo_fork/resolve/main/src/python-doctr/.github/workflows/pr-labels.yml
- Command line
-
hf download hf://spaces/MikeTrizna/doctr_demo_fork/src/python-doctr/.github/workflows/pr-labels.yml
-
curl -L -o pr-labels.yml https://huggingface.co/spaces/MikeTrizna/doctr_demo_fork/resolve/main/src/python-doctr/.github/workflows/pr-labels.yml
1.2 kB
| name: pr-labels | |
| on: | |
| pull_request: | |
| branches: main | |
| types: closed | |
| jobs: | |
| is-properly-labeled: | |
| if: github.event.pull_request.merged == true | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up python | |
| uses: actions/setup-python@v5 | |
| - name: Install requests | |
| run: pip install requests | |
| - name: Process commit and find merger responsible for labeling | |
| id: commit | |
| run: echo "::set-output name=merger::$(python .github/verify_pr_labels.py ${{ github.event.pull_request.number }})" | |
| - name: 'Comment PR' | |
| uses: actions/github-script@v7.0.1 | |
| if: ${{ steps.commit.outputs.merger != '' }} | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const { issue: { number: issue_number }, repo: { owner, repo } } = context; | |
| github.rest.issues.createComment({ issue_number, owner, repo, body: 'Hey ${{ steps.commit.outputs.merger }} ๐\nYou merged this PR, but it is not correctly labeled. The list of valid labels is available at https://github.com/mindee/doctr/blob/main/.github/verify_pr_labels.py' }); | |