This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull Request Regex Title Labeler | |
on: | |
pull_request_target: | |
types: [opened, edited] | |
# Restrict the permissions granted to the use of secrets.GITHUB_TOKEN in this | |
# github actions workflow: | |
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication | |
permissions: | |
contents: read | |
pull-requests: write | |
jobs: | |
labeler: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: '3.9' | |
- name: Install PyGithub | |
run: pip install -Uq PyGithub | |
- name: Label pull request | |
run: python .github/scripts/label_title_regex.py | |
env: | |
CONTEXT_GITHUB: ${{ toJson(github) }} |