diff --git a/.github/labeler.yaml b/.github/labeler.yaml new file mode 100644 index 0000000..6c52467 --- /dev/null +++ b/.github/labeler.yaml @@ -0,0 +1,38 @@ +# Add 'others' label to any file changes +others: +- changed-files: + - any-glob-to-any-file: '**' + +# Add 'Documentation' label to any file changes within 'docs' or 'guides' folders +documentation: +- changed-files: + - any-glob-to-any-file: + - 'docs/**' + - 'guides/**' + - '**/*.md' + - '**/*.MD' + +# Add 'source' label to any change to src files +source: +- all: + - changed-files: + - any-glob-to-any-file: + - 'src/**/*' + - 'go.mod' + - 'go.sum' + +# Add 'feature' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name +feature: + - head-branch: + - '^feature' + - '^feat' + - 'feature' + - 'feat' + +# Add 'bug' label to any PR where the head branch name starts with `bug` or has a `fix` section in the name +bug: + - head-branch: + - '^bug' + - '^fix' + - 'bug' + - 'fix' diff --git a/.github/release.yml b/.github/release.yaml similarity index 83% rename from .github/release.yml rename to .github/release.yaml index 8f2b21e..15f4037 100644 --- a/.github/release.yml +++ b/.github/release.yaml @@ -6,8 +6,9 @@ changelog: - title: 🛠 Breaking Changes labels: - breaking-change - - title: 🏕 Improvements/Enhancements + - title: 🏕 Features/Improvements/Enhancements labels: + - feature - enhancement - title: 🛠 Bug Fixes labels: diff --git a/.github/workflows/labeler.yaml b/.github/workflows/labeler.yaml new file mode 100644 index 0000000..643ae33 --- /dev/null +++ b/.github/workflows/labeler.yaml @@ -0,0 +1,16 @@ +name: Labeler +on: [pull_request_target] + +jobs: + label: + + runs-on: ubuntu-latest + permissions: + contents: read + pull-requests: write + + steps: + - uses: actions/labeler@v5 + with: + repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: ".github/labeler.yaml" diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 56c7278..c2bc7a0 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -16,6 +16,7 @@ jobs: skip_after_successful_duplicate: 'true' cancel_others: 'true' do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' + paths: '["go.mod", "go.sum", "src/**/*"]' golangci: name: GolangCI Lint needs: pre_job diff --git a/.github/workflows/test-acceptance.yaml b/.github/workflows/test-acceptance.yaml index aaef972..689ea1a 100644 --- a/.github/workflows/test-acceptance.yaml +++ b/.github/workflows/test-acceptance.yaml @@ -18,6 +18,7 @@ jobs: skip_after_successful_duplicate: 'true' cancel_others: 'true' do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' + paths: '["go.mod", "go.sum", "Makefile", "src/**/*", "test/**/*"]' build: name: Build plugin executable binary needs: pre_job diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6bd10aa..7a923db 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -18,6 +18,7 @@ jobs: skip_after_successful_duplicate: 'true' cancel_others: 'true' do_not_skip: '["pull_request", "workflow_dispatch", "schedule"]' + paths: '["go.mod", "go.sum", "Makefile", "src/**/*"]' test: name: Test needs: pre_job