Skip to content

Commit

Permalink
prunes git history
Browse files Browse the repository at this point in the history
  • Loading branch information
mchmarny committed Mar 5, 2023
1 parent ba19bc9 commit a992764
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/on-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ jobs:
${{ runner.os }}-go-
- name: Checkout Code
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
- name: Prune Git History
run: git fetch --prune --unshallow
- name: Install Syft
uses: anchore/sbom-action/download-syft@07978da4bdb4faa726e52dfc6b1bed63d4b56479 # v0.13.3
with:
Expand All @@ -53,7 +55,7 @@ jobs:
with:
distribution: goreleaser
version: latest
args: release --rm-dist
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v0.0.6
v0.0.7
19 changes: 10 additions & 9 deletions pkg/aa/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ import (
)

const (
scopeDefault = "https://www.googleapis.com/auth/cloud-platform"
scopeDefault = "https://www.googleapis.com/auth/cloud-platform"
serviceEndpoint = "https://containeranalysis.googleapis.com/v1/"
)

var (
Expand All @@ -36,18 +37,18 @@ func Get(ctx context.Context, url string, resp any) error {
return Exec(ctx, req, resp)
}

func Submit(ctx context.Context, url string, content, resp any) error {
func Post(ctx context.Context, url string, content, resp any) error {
if url == "" {
return errors.New("url is empty")
}

if content == nil {
return errors.New("content is nil")
}

b, err := json.Marshal(content)
if err != nil {
return errors.Wrap(err, "error marshaling content")
var b []byte
if content != nil {
var err error
b, err = json.Marshal(content)
if err != nil {
return errors.Wrap(err, "error marshaling content")
}
}

req, err := http.NewRequest(http.MethodPost, url, bytes.NewBuffer(b))
Expand Down

0 comments on commit a992764

Please sign in to comment.