From c31d7c9b596d2f7a7b50d5bd25a13e51541de508 Mon Sep 17 00:00:00 2001 From: sebm253 <42180891+sebm253@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:01:18 +0200 Subject: [PATCH 1/3] Add pull request labeler --- .github/labeler.yml | 35 +++++++++++++++++++++++++++++++++++ .github/workflows/labeler.yml | 12 ++++++++++++ 2 files changed, 47 insertions(+) create mode 100644 .github/labeler.yml create mode 100644 .github/workflows/labeler.yml diff --git a/.github/labeler.yml b/.github/labeler.yml new file mode 100644 index 00000000..988ea277 --- /dev/null +++ b/.github/labeler.yml @@ -0,0 +1,35 @@ +# branch names +"type:bugfix": + - head-branch: [ '^fix/', '^bugfix/', '^hotfix/'] +"type:docs": + - head-branch: [ '^docs/', '^documentation/' ] +"type:enhancement": + - head-branch: [ '^feature/', '^feat/' ] +"type:refactor": + - head-branch: [ '^refactor/' ] + +# changed files +"t:caching": + - changed-files: + - any-glob-to-any-file: [ 'cache/*' ] +"t:gateway": + - changed-files: + - any-glob-to-any-file: [ 'gateway/*' ] +"t:handler": + - changed-files: + - any-glob-to-any-file: [ 'handler/*' ] +"t:oauth2": + - changed-files: + - any-glob-to-any-file: [ 'oauth2/*' ] +"t:ratelimits": + - changed-files: + - any-glob-to-any-file: [ 'rest/rest_rate_limiter_*', 'gateway/gateway_rate_limiter_*' ] +"t:rest": + - changed-files: + - any-glob-to-any-file: [ 'rest/*' ] +"t:sharding": + - changed-files: + - any-glob-to-any-file: [ 'sharding/*' ] +"t:voice": + - changed-files: + - any-glob-to-any-file: [ 'voice/*' ] \ No newline at end of file diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml new file mode 100644 index 00000000..05b2d29b --- /dev/null +++ b/.github/workflows/labeler.yml @@ -0,0 +1,12 @@ +name: "Label pull request" +on: + - pull_request_target + +jobs: + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 \ No newline at end of file From 9cc7f9dcd2ffa81644c6f98d0f74bfebf65edc34 Mon Sep 17 00:00:00 2001 From: sebm253 <42180891+sebm253@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:02:50 +0200 Subject: [PATCH 2/3] adjust editorconfig --- .editorconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.editorconfig b/.editorconfig index 5997b1dc..cf6454ec 100644 --- a/.editorconfig +++ b/.editorconfig @@ -47,3 +47,6 @@ ij_go_wrap_func_result_newline_before_rparen = true indent_style = tab max_line_length = 600 ij_smart_tabs = true + +[{*.yaml,*.yml}] +indent_size = 2 From 97655ac5542288e9c416ed0841a25caeb54e17bf Mon Sep 17 00:00:00 2001 From: sebm253 <42180891+sebm253@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:03:34 +0200 Subject: [PATCH 3/3] reformat ymls --- .github/workflows/labeler.yml | 16 ++++----- .github/workflows/lint.yml | 62 +++++++++++++++++------------------ 2 files changed, 39 insertions(+), 39 deletions(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 05b2d29b..8b00a2c3 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,12 +1,12 @@ name: "Label pull request" on: - - pull_request_target + - pull_request_target jobs: - labeler: - permissions: - contents: read - pull-requests: write - runs-on: ubuntu-latest - steps: - - uses: actions/labeler@v5 \ No newline at end of file + labeler: + permissions: + contents: read + pull-requests: write + runs-on: ubuntu-latest + steps: + - uses: actions/labeler@v5 \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index c20a0c05..6e226a67 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,38 +1,38 @@ name: Go on: - push: - pull_request_target: + push: + pull_request_target: jobs: - gobuild: - runs-on: ubuntu-latest - steps: - - uses: actions/setup-go@v3 - with: - go-version: 1.21 - - uses: actions/checkout@v3 - - name: go build - run: go build -v ./... + gobuild: + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3 + with: + go-version: 1.21 + - uses: actions/checkout@v3 + - name: go build + run: go build -v ./... - gotest: - runs-on: ubuntu-latest - steps: - - uses: actions/setup-go@v3 - with: - go-version: 1.21 - - uses: actions/checkout@v3 - - name: go build - run: go test -v ./... + gotest: + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3 + with: + go-version: 1.21 + - uses: actions/checkout@v3 + - name: go build + run: go test -v ./... - golangci: - runs-on: ubuntu-latest - steps: - - uses: actions/setup-go@v3 - with: - go-version: 1.21 - - uses: actions/checkout@v3 - - name: golangci-lint - uses: golangci/golangci-lint-action@v3 - with: - version: latest + golangci: + runs-on: ubuntu-latest + steps: + - uses: actions/setup-go@v3 + with: + go-version: 1.21 + - uses: actions/checkout@v3 + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: latest