Skip to content

Commit

Permalink
Add pull request labeler (#380)
Browse files Browse the repository at this point in the history
* Add pull request labeler

* adjust editorconfig

* reformat ymls
  • Loading branch information
sebm253 authored Aug 15, 2024
1 parent 4cd4fff commit 586f0d2
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 31 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
35 changes: 35 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -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/*' ]
12 changes: 12 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -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
62 changes: 31 additions & 31 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 586f0d2

Please # to comment.