Skip to content

Commit 989a0bf

Browse files
authored
Merge pull request #13 from kontrolplane/task/refactor-into-struct-based-setup
refactor: setup methods, add unit tests and improve pipeline
2 parents ec243f3 + b3f9781 commit 989a0bf

6 files changed

Lines changed: 472 additions & 91 deletions

File tree

.github/workflows/continuous-integration.yaml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@ jobs:
1717
- name: install go
1818
uses: actions/setup-go@v4
1919
with:
20-
go-version: 1.23.1
20+
go-version: 1.24.3
21+
22+
- name: run tests
23+
run: go test -v ./...
24+
25+
- name: run linting
26+
uses: golangci/golangci-lint-action@v6
27+
with:
28+
version: latest
2129

22-
- name: pull request title validator
30+
- name: pull request title validator [default]
2331
uses: ./ # kontrolplane/pull-request-title-validator@latest

Dockerfile

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1-
FROM golang:1.23.1 AS build
1+
FROM golang:1.24.3 AS build
2+
23
WORKDIR /action
4+
35
COPY . .
6+
47
RUN CGO_ENABLED=0 go build -o pull-request-title-validator
58

6-
FROM alpine:latest
9+
FROM alpine:latest
10+
711
COPY --from=build /action/pull-request-title-validator /pull-request-title-validator
8-
ENTRYPOINT ["/pull-request-title-validator"]
12+
13+
ENTRYPOINT ["/pull-request-title-validator"]

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
runs-on: ubuntu-latest
3939
steps:
4040
- name: validate pull request title
41-
uses: kontrolplane/pull-request-title-validator@v1.4.2
41+
uses: kontrolplane/pull-request-title-validator@v1.5.0
4242
```
4343
4444
### Custom types
@@ -62,7 +62,7 @@ jobs:
6262
runs-on: ubuntu-latest
6363
steps:
6464
- name: validate pull request title
65-
uses: kontrolplane/pull-request-title-validator@v1.4.2
65+
uses: kontrolplane/pull-request-title-validator@v1.5.0
6666
with:
6767
types: "fix,feat,chore"
6868
```
@@ -90,7 +90,7 @@ jobs:
9090
runs-on: ubuntu-latest
9191
steps:
9292
- name: validate pull request title
93-
uses: kontrolplane/pull-request-title-validator@v1.4.2
93+
uses: kontrolplane/pull-request-title-validator@v1.5.0
9494
with:
9595
scopes: "api,lang,parser,package/.+"
9696
```

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/kontrolplane/pull-request-title-validator
22

3-
go 1.23.1
3+
go 1.24.3
44

55
require github.com/caarlos0/env v3.5.0+incompatible
66

0 commit comments

Comments
 (0)