diff --git a/.github/issue-labeler.yml b/.github/issue-labeler.yml new file mode 100644 index 00000000..37370acc --- /dev/null +++ b/.github/issue-labeler.yml @@ -0,0 +1,10 @@ +bug: + - '\b(bug|error|fail|crash|defect|broken)\b' + - 'Bug report' + +enhancement: + - '\b(feature|request|idea|proposal|improve|add)\b' + - 'Feature request' + +question: + - '\b(question|help|how to|support|query)\b' diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml new file mode 100644 index 00000000..07e38abe --- /dev/null +++ b/.github/pr-labeler.yml @@ -0,0 +1,21 @@ +core: + - graphgen/**/* + +examples: + - examples/**/* + +baselines: + - baselines/**/* + +documentation: + - "**/*.md" + +workflows: + - .github/workflows/*.yml + - .github/workflows/*.yaml + +config: + - .github/pr-labeler.yml + - .github/issue-labeler.yml + - .pre-commit-config.yaml + - .pylintrc diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000..17d658e7 --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,31 @@ +name: Labeler +on: + pull_request_target: + types: [opened, synchronize, reopened] + issues: + types: [opened] + +permissions: + contents: read + pull-requests: write + issues: write + +jobs: + pr-labeler: + if: github.event_name == 'pull_request_target' + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/pr-labeler.yml + + issue-labeler: + if: github.event_name == 'issues' + runs-on: ubuntu-latest + steps: + - uses: github/issue-labeler@v3.4 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/issue-labeler.yml + enable-versioned-regex: 0