File tree Expand file tree Collapse file tree 6 files changed +53
-5
lines changed Expand file tree Collapse file tree 6 files changed +53
-5
lines changed Original file line number Diff line number Diff line change 1+ mode : commit
2+ min_length : 3
3+ allowed :
4+ - aspell
5+ - repo
6+ - yaml
7+ - config
8+ - Github
9+ - Gitlab
10+ - env
11+ - failsafe
12+ - golang
13+ - mkdir
14+ - WORKDIR
15+ - apk
16+ - ENTRYPOINT
17+ - ubuntu
18+ - golangci
19+ - sudo
20+ - releaser
21+ - backend
22+ - backends
23+ - frontend
24+ - frontends
25+ - tcp
26+ - crd
27+ - linter
28+ - linters
Original file line number Diff line number Diff line change 1- name : Commit subject
1+ name : HAProxy check commit message
22on :
33 pull_request :
44 branches :
77 check :
88 runs-on : ubuntu-latest
99 steps :
10- - name : check- commit
11- uses : docker://haproxytech/check- commit:v2.1.0
10+ - name : commit-policy
11+ uses : docker://ghcr.io/ haproxytech/commit-check:5.0.4
1212 env :
1313 API_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ cmd/dataplaneapi/*
44.vscode /
55.test /
66bin /golangci-lint
7+ bin /check-commit
78
89# ignore Goland ide config
910.idea
Original file line number Diff line number Diff line change @@ -57,10 +57,10 @@ gofumpt:
5757 script :
5858 - make gofumpt
5959 - test -z "$(git diff 2> /dev/null)" || exit 'Go code not formatted, issue \`make gofumpt\` and commit the result'
60- lint- commit-msg :
60+ commit-policy :
6161 stage : lint
6262 image :
63- name : $CI_REGISTRY_GO/check- commit:v2.1.0
63+ name : $CI_REGISTRY_GO/commit-check:5.0.4
6464 entrypoint : [""]
6565 tags :
6666 - go
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ SWAGGER_VERSION=${shell curl -s https://raw.githubusercontent.com/haproxytech/cl
1010BUILD_DATE =$(shell date -u '+% Y-% m-% dT% H:% M:% SZ')
1111CGO_ENABLED? =0
1212GOLANGCI_LINT_VERSION =1.57.1
13+ CHECK_COMMIT =5.0.4
1314
1415all : update clean build
1516
@@ -52,3 +53,12 @@ generate:
5253generate-native :
5354 generate/swagger/script.sh
5455 generate/post_swagger.sh
56+
57+ .PHONY : test
58+ test :
59+ go test ./...
60+
61+ .PHONY : check-commit
62+ check-commit :
63+ cd bin; CHECK_COMMIT=${CHECK_COMMIT} sh check-commit.sh
64+ bin/check-commit
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+ V=$( ./check-commit tag)
3+
4+ if echo " $V " | grep -q " v$CHECK_COMMIT " ; then
5+ echo " $V "
6+ else
7+ echo " go install github.com/haproxytech/check-commit/v5@v$CHECK_COMMIT "
8+ GOBIN=$( pwd) go install github.com/haproxytech/check-commit/v5@v$CHECK_COMMIT
9+ fi
You can’t perform that action at this time.
0 commit comments