Skip to content

Commit de9e8fe

Browse files
oktalzmjuraga
authored andcommitted
DOC/MEDIUM: ci: add aspell to commit check job
1 parent fbe93ef commit de9e8fe

File tree

6 files changed

+53
-5
lines changed

6 files changed

+53
-5
lines changed

.aspell.yml

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
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

.github/workflows/check.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Commit subject
1+
name: HAProxy check commit message
22
on:
33
pull_request:
44
branches:
@@ -7,7 +7,7 @@ jobs:
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 }}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ cmd/dataplaneapi/*
44
.vscode/
55
.test/
66
bin/golangci-lint
7+
bin/check-commit
78

89
# ignore Goland ide config
910
.idea

.gitlab-ci.yml

+2-2
Original file line numberDiff line numberDiff 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

Makefile

+10
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ SWAGGER_VERSION=${shell curl -s https://raw.githubusercontent.com/haproxytech/cl
1010
BUILD_DATE=$(shell date -u '+%Y-%m-%dT%H:%M:%SZ')
1111
CGO_ENABLED?=0
1212
GOLANGCI_LINT_VERSION=1.57.1
13+
CHECK_COMMIT=5.0.4
1314

1415
all: update clean build
1516

@@ -52,3 +53,12 @@ generate:
5253
generate-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

bin/check-commit.sh

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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

0 commit comments

Comments
 (0)