Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pull request labeler #380

Merged
merged 3 commits into from
Aug 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading