diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..395e97e --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,29 @@ +'Type: Dependencies': + - '(depende|deps|Deps|Depende)' + +'Type: Documentation': + - '(documentation|Docs|Documentation|Docs)' + +'Type: GHA': + - '(gha|github action|GHA|Github Action|Github action)' + +'Type: Infrastructure': + - '(depende|deps|Deps|Depende|documentation|Docs|Documentation|Docs|gha|github action|GHA|Github Action|Github action|testing|tests|coverage|Testing|Tests|Coverage)' + +'Type: Testing': + - '(testing|tests|coverage|Testing|Tests|Coverage)' + +'Type: Bug': + - '(bug|patch|fix|Bug|Fix|Patch)' + +'Type: Enhancement': + - '(feature|Feature)' + +'Type: Performance': + - '(performance|Performance)' + +'Type: Tech Debt': + - '(debt|Debt)' + +'Type: Question': + - '(question|Question)' \ No newline at end of file diff --git a/.github/pull_request_labeler.yml b/.github/pull_request_labeler.yml new file mode 100644 index 0000000..7726a5e --- /dev/null +++ b/.github/pull_request_labeler.yml @@ -0,0 +1,19 @@ +'Type: Dependencies': + - requirements/stratify.yml + - requirements/py*.yml + - requirements/pypi*.txt + - requirements/locks/py*.txt + +'Type: Documentation': + - README.md + - index.ipynb + +'Type: GHA': + - .github/*.yml + - .github/**/*.yml + +'Type: Infrastructure': + - '*' + +'Type: Testing': + - src/stratify/tests/* diff --git a/.github/workflows/ci-label.yml b/.github/workflows/ci-label.yml new file mode 100644 index 0000000..ac6b3bd --- /dev/null +++ b/.github/workflows/ci-label.yml @@ -0,0 +1,28 @@ +# Reference +# - https://github.com/actions/labeler +# - https://github.com/github/issue-labeler + +name: ci-label + +on: + pull_request_target: + types: [opened, edited, reopened] + issues: + types: [opened, edited, reopened] + +jobs: + issue_triage: + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v4 + with: + configuration-path: .github/pull_request_labeler.yml + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - uses: github/issue-labeler@v3.1 + with: + configuration-path: .github/labeler.yml + enable-versioned-regex: 0 + include-title: 1 + repo-token: ${{ secrets.GITHUB_TOKEN }} + sync-labels: 1