Skip to content

Commit 730ca70

Browse files
oktalzmjuraga
authored andcommitted
DOC/MEDIUM: ci: add aspell to commit check job
1 parent 4f46e8e commit 730ca70

File tree

6 files changed

+49
-5
lines changed

6 files changed

+49
-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
@@ -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

Makefile

+6
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.61.0
13+
CHECK_COMMIT=5.0.4
1314

1415
all: update clean build
1516

@@ -65,3 +66,8 @@ generate-native:
6566
.PHONY: test
6667
test:
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

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)