Skip to content

Commit 5129c53

Browse files
committed
Project import generated by Copybara.
GitOrigin-RevId: ece58b16ad2d541f0946e92d42109e5347c75411
1 parent 6db6583 commit 5129c53

File tree

8 files changed

+94
-103
lines changed

8 files changed

+94
-103
lines changed

.golangci.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
linters:
55
disable-all: true
66
enable:
7-
- deadcode
8-
- depguard
97
- dogsled
108
- errcheck
119
- gofmt

Dockerfile.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM golang:1.18
1+
FROM golang:1.25.1
22

33
WORKDIR /src
44

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ outputs:
3636
3737
runs:
3838
using: docker
39-
image: docker://docker.io/byndid/auth-commit-sig:1.0.0
39+
image: docker://docker.io/byndid/auth-commit-sig:1.1.0-rc1
4040
env:
4141
API_TOKEN: ${{ inputs.api_token }}
4242
ALLOWLIST_CONFIG_FILE_PATH: ${{ inputs.allowlist_config_file_path }}

action/allowlist.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package action
22

33
import (
44
"fmt"
5-
"io/ioutil"
65
"log"
6+
"os"
77
"strings"
88

99
"github.com/ProtonMail/go-crypto/openpgp"
@@ -59,7 +59,7 @@ func LoadAllowlistYAML(filePath string) (*AllowlistYAML, error) {
5959
log.Println("No allowlist configured")
6060
return &AllowlistYAML{}, nil
6161
}
62-
yfile, err := ioutil.ReadFile(filePath)
62+
yfile, err := os.ReadFile(filePath)
6363
if err != nil {
6464
return nil, fmt.Errorf(`failed to read allowlist yaml configuration file at '%s': %w`, filePath, err)
6565
}

action/api.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"context"
55
"encoding/json"
66
"fmt"
7-
"io/ioutil"
7+
"io"
88
"net/http"
99
"net/url"
1010
"path"
@@ -58,7 +58,7 @@ func (a Authorization) PrettyPrint() string {
5858
return string(bs)
5959
}
6060

61-
// GPGKey contains the GPG public key.
61+
// GPGKey contains the GPG public key.
6262
type GPGKey struct {
6363
// ID is the Beyond Identity ID of the GPG key.
6464
ID string `json:"id"`
@@ -96,7 +96,7 @@ func (c APIClient) GetAuthorization(ctx context.Context, keyID, committerEmail s
9696
}
9797

9898
defer resp.Body.Close()
99-
body, err := ioutil.ReadAll(resp.Body)
99+
body, err := io.ReadAll(resp.Body)
100100
if err != nil {
101101
return nil, fmt.Errorf("failed to read api response: %w", err)
102102
}

action/git.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ package action
22

33
import (
44
"fmt"
5-
"io/ioutil"
5+
"io"
66

77
git "github.com/go-git/go-git/v5"
88
"github.com/go-git/go-git/v5/plumbing"
@@ -43,7 +43,7 @@ func PrettyPrintCommit(commit *object.Commit) string {
4343
panic(err)
4444
}
4545

46-
bs, err := ioutil.ReadAll(r)
46+
bs, err := io.ReadAll(r)
4747
if err != nil {
4848
panic(err)
4949
}
@@ -65,7 +65,7 @@ func EncodedCommitWithoutSignature(commit *object.Commit) (string, error) {
6565
return "", fmt.Errorf("failed to build reader: %w", err) // should never happen
6666
}
6767

68-
encoded, err := ioutil.ReadAll(r)
68+
encoded, err := io.ReadAll(r)
6969
if err != nil {
7070
return "", fmt.Errorf("failed to read from encoding: %w", err) // should never happen
7171
}

go.mod

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
11
module byndid/auth-commit-sig
22

3-
go 1.18
3+
go 1.23.0
44

55
require (
6-
github.com/ProtonMail/go-crypto v0.0.0-20210428141323-04723f9f07d7
7-
github.com/go-git/go-git/v5 v5.4.2
6+
github.com/ProtonMail/go-crypto v1.1.6
7+
github.com/go-git/go-git/v5 v5.16.4
88
gopkg.in/yaml.v3 v3.0.1
99
)
1010

1111
require (
12-
github.com/Microsoft/go-winio v0.4.16 // indirect
13-
github.com/acomagu/bufpipe v1.0.3 // indirect
14-
github.com/cloudflare/circl v1.2.0 // indirect
15-
github.com/emirpasic/gods v1.12.0 // indirect
16-
github.com/go-git/gcfg v1.5.0 // indirect
17-
github.com/go-git/go-billy/v5 v5.3.1 // indirect
18-
github.com/imdario/mergo v0.3.12 // indirect
12+
dario.cat/mergo v1.0.0 // indirect
13+
github.com/Microsoft/go-winio v0.6.2 // indirect
14+
github.com/cloudflare/circl v1.6.1 // indirect
15+
github.com/cyphar/filepath-securejoin v0.4.1 // indirect
16+
github.com/emirpasic/gods v1.18.1 // indirect
17+
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
18+
github.com/go-git/go-billy/v5 v5.6.2 // indirect
19+
github.com/golang/groupcache v0.0.0-20241129210726-2c02b8208cf8 // indirect
1920
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
20-
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351 // indirect
21-
github.com/mitchellh/go-homedir v1.1.0 // indirect
22-
github.com/sergi/go-diff v1.1.0 // indirect
23-
github.com/xanzy/ssh-agent v0.3.0 // indirect
24-
golang.org/x/crypto v0.0.0-20220829220503-c86fa9a7ed90 // indirect
25-
golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2 // indirect
26-
golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86 // indirect
21+
github.com/kevinburke/ssh_config v1.2.0 // indirect
22+
github.com/pjbgf/sha1cd v0.3.2 // indirect
23+
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
24+
github.com/skeema/knownhosts v1.3.1 // indirect
25+
github.com/xanzy/ssh-agent v0.3.3 // indirect
26+
golang.org/x/crypto v0.37.0 // indirect
27+
golang.org/x/net v0.39.0 // indirect
28+
golang.org/x/sys v0.32.0 // indirect
2729
gopkg.in/warnings.v0 v0.1.2 // indirect
2830
)
2931

go.sum

Lines changed: 65 additions & 74 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)