diff --git a/.github/dependabot.yaml b/.github/dependabot.yaml new file mode 100644 index 0000000..0fe9d37 --- /dev/null +++ b/.github/dependabot.yaml @@ -0,0 +1,18 @@ +version: 2 + +updates: +- package-ecosystem: github-actions + commit-message: + prefix: chore + prefix-development: chore + directory: "/" + labels: + - chore ๐Ÿงน + - workflows ๐Ÿ‘ทโ€โ™€๏ธ + pull-request-branch-name: + separator: / + reviewers: + - unfunco + schedule: + day: sunday + interval: weekly diff --git a/.github/labeler.yaml b/.github/labeler.yaml new file mode 100644 index 0000000..587ec30 --- /dev/null +++ b/.github/labeler.yaml @@ -0,0 +1,3 @@ +"workflows ๐Ÿ‘ทโ€โ™€๏ธ": +- changed-files: + - any-glob-to-any-file: .github/**/*.yaml diff --git a/.github/workflows/pr_label.yaml b/.github/workflows/pr_label.yaml new file mode 100644 index 0000000..ee125d1 --- /dev/null +++ b/.github/workflows/pr_label.yaml @@ -0,0 +1,42 @@ +name: PR / Label + +on: + pull_request_target: { } + +jobs: + triage: + name: Triage + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Apply context labels + uses: actions/labeler@v5 + with: + configuration-path: .github/labeler.yaml + sync-labels: true + - name: Apply commit message labels + uses: actions/github-script@v7 + with: + script: | + const labels = [] + if (context.payload.pull_request.title.startsWith('fix:')) { + labels.push('bug ๐Ÿ›') + } + if (context.payload.pull_request.title.startsWith('chore:')) { + labels.push('chore ๐Ÿงน') + } + if (context.payload.pull_request.title.startsWith('feat:')) { + labels.push('feature ๐Ÿ’ก') + } + if (labels.length > 0) { + github.rest.issues.addLabels({ + issue_number: context.issue.number, + labels, + owner: context.repo.owner, + repo: context.repo.repo, + }) + }