File tree Expand file tree Collapse file tree 6 files changed +49
-5
lines changed Expand file tree Collapse file tree 6 files changed +49
-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 @@ -72,10 +72,10 @@ gofumpt:
7272 script :
7373 - make gofumpt
7474 - test -z "$(git diff 2> /dev/null)" || exit 'Go code not formatted, issue \`make gofumpt\` and commit the result'
75- lint- commit-msg :
75+ commit-policy :
7676 stage : lint
7777 image :
78- name : $CI_REGISTRY_GO/check- commit:v2.1.0
78+ name : $CI_REGISTRY_GO/commit-check:5.0.4
7979 entrypoint : [""]
8080 tags :
8181 - 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.61.0
13+ CHECK_COMMIT =5.0.4
1314
1415all : update clean build
1516
@@ -65,3 +66,8 @@ generate-native:
6566.PHONY : test
6667test :
6768 go test ./...
69+
70+ .PHONY : check-commit
71+ check-commit :
72+ cd bin; CHECK_COMMIT=${CHECK_COMMIT} sh check-commit.sh
73+ 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