Skip to content

Commit 970ced7

Browse files
committed
chore: add make-gen-delta workflow
1 parent 8b85b51 commit 970ced7

File tree

5 files changed

+46
-3
lines changed

5 files changed

+46
-3
lines changed

.github/workflows/make-gen-delta.yml

+42
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
name: "make-gen-delta"
2+
on:
3+
- workflow_dispatch
4+
- push
5+
- workflow_call
6+
7+
permissions:
8+
contents: read
9+
10+
jobs:
11+
make-gen-delta:
12+
name: "Check for uncommitted changes from make gen"
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: '0'
18+
- name: Determine Go version
19+
id: get-go-version
20+
# We use .go-version as our source of truth for current Go
21+
# version, because "goenv" can react to it automatically.
22+
run: |
23+
echo "Building with Go $(cat .go-version)"
24+
echo "go-version=$(cat .go-version)" >> "$GITHUB_OUTPUT"
25+
- name: Set up Go
26+
uses: actions/setup-go@v4
27+
with:
28+
go-version: "${{ steps.get-go-version.outputs.go-version }}"
29+
- name: Running go mod tidy
30+
run: |
31+
go mod tidy
32+
- name: Install Dependencies
33+
run: |
34+
make tools
35+
- name: Running make fmt
36+
run: |
37+
make fmt
38+
- name: Check for changes
39+
run: |
40+
git diff --exit-code
41+
git status --porcelain
42+
test -z "$(git status --porcelain)"

codes.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package gldap
22

3-
// ldap result codes
3+
// ldap result codes
44
const (
55
ResultSuccess = 0
66
ResultOperationsError = 1
@@ -154,7 +154,7 @@ var ResultCodeMap = map[uint16]string{
154154
ResultAuthorizationDenied: "Authorization Denied",
155155
}
156156

157-
// ldap application codes
157+
// ldap application codes
158158
const (
159159
ApplicationBindRequest = 0
160160
ApplicationBindResponse = 1

request_test.go

-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,6 @@ func TestConvertString(t *testing.T) {
349349
}
350350
for _, tc := range tests {
351351
t.Run(tc.name, func(t *testing.T) {
352-
353352
assert, require := assert.New(t), require.New(t)
354353

355354
got, err := ConvertString(tc.encodedStrings...)

testdirectory/directory_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ func testSafeBuf(t *testing.T) *safeBuf {
157157
buf: &strings.Builder{},
158158
}
159159
}
160+
160161
func (w *safeBuf) Write(p []byte) (n int, err error) {
161162
w.mu.Lock()
162163
defer w.mu.Unlock()

testing.go

+1
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ func testSafeBuf(t *testing.T) *safeBuf {
261261
buf: &strings.Builder{},
262262
}
263263
}
264+
264265
func (w *safeBuf) Write(p []byte) (n int, err error) {
265266
w.mu.Lock()
266267
defer w.mu.Unlock()

0 commit comments

Comments
 (0)