diff --git a/.craft b/.craft index 7f7ef2f..f5c4802 100644 --- a/.craft +++ b/.craft @@ -8,6 +8,7 @@ ci: options: - codecov - codeql + - labeler release: auto: true docker: diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 0000000..0f1870b --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,95 @@ +# Code generated by craft; DO NOT EDIT. + +# https://github.com/marketplace/actions/release-drafter#autolabeler + +autolabeler: + - label: enhancement + title: + - /feat\/.+/ + - /refactor\/.+/ + branch: + - /dev\/.+/ + + - label: breaking + body: + - /.*BREAKING.*/ + + - label: bug + title: + - /fix\/.+/ + - /perf\/.+/ + - /revert\/.+/ + branch: + - /(hot)?fix\/.+/ + + - label: documentation + title: + - /doc(s)?\/.+/ + branch: + - /doc(s)?\/.+/ + files: + - "**/*.md" + - "**/doc.go" + - "**/docs/**" + + - label: chore + title: + - /chore\/.+/ + + - label: test + title: + - /test\/.+/ + branch: + - /test\/.+/ + files: + - "**/*_test.go" + - "**/*.spec.js" + - "**/*.spec.ts" + - "**/*.test.js" + - "**/*.test.ts" + - "**/test/**" + - "**/testdata/**" + - "**/tests/**" + + - label: github_actions + files: + - "action.yml" + - "**/.github/actions/**" + - "**/.github/workflows/**" + + - label: go + files: + - "**/*.go" + + - label: javascript + files: + - "**/*.js" + + - label: python + files: + - "**/*.py" + + - label: rust + files: + - "**/*.rs" + + - label: shell + files: + - "**/*.sh" + - "**/*.zsh" + - "**/*.bash" + + - label: typescript + files: + - "**/*.ts" + + - label: dependencies + title: + - /.*\(deps\).*/ + # files: + # - "**/go.mod" + # - "**/go.sum" + # - "**/package.json" + +template: | + $CHANGES \ No newline at end of file diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 0000000..a729aad --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,40 @@ +# Code generated by craft; DO NOT EDIT. + +name: Labeler +run-name: Labeler + +on: + pull_request: # autolabeler on project pull requests + types: + - opened + - reopened + - synchronize + # pull_request_target: # autolabeler on fork pull requests + # types: + # - opened + # - reopened + # - synchronize + +jobs: + + labeler: + name: Labeler + runs-on: ubuntu-latest + permissions: + contents: read # enfore rights to specify no release, even draft, is created + pull-requests: write + steps: + # https://github.com/marketplace/actions/release-drafter + - id: drafter + uses: release-drafter/release-drafter@v6 + with: + commitish: ${{ github.base_ref }} + config-name: labeler.yml + latest: false + name: v$RESOLVED_VERSION + prerelease-identifier: labeler + prerelease: true + publish: false + tag: v$RESOLVED_VERSION + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file