Skip to content

Commit

Permalink
Merge pull request #106 from scan-io-git/shikari/vcs-aligning
Browse files Browse the repository at this point in the history
Aligning Gitab and Github plugins with Bitbucket
  • Loading branch information
shikari-ac authored Jan 10, 2025
2 parents 94e3007 + 09729dc commit 616d94b
Show file tree
Hide file tree
Showing 26 changed files with 1,273 additions and 376 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: 1.19
go-version: 1.23

- name: Build
run: go build -v ./...
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Important: As of now, Semgrep does not support ARM architectures - see https://github.com/returntocorp/semgrep/issues/2252 for details!

# Stage 1: Build Scanio core and plugins
FROM golang:1.19.8-alpine3.17 AS build-scanio
FROM golang:1.23.4-alpine3.21 AS build-scanio

WORKDIR /usr/src/scanio

Expand Down
8 changes: 4 additions & 4 deletions cmd/integration-vcs/integration-vcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ var (
scanio integration-vcs --vcs github --action checkPR https://github.com/scan-io-git/scan-io/pull/1
# Add a user to the PR
scanio integration-vcs --vcs github --action addRoleToPR --domain github.com --namespace scan-io-git --repository scan-io --pull-request-id 1 --login scanio-bot --role REVIEWER
scanio integration-vcs --vcs github --action addRoleToPR --domain github.com --namespace scan-io-git --repository scan-io --pull-request-id 1 --role REVIEWER
# Add a user to the PR using URL
scanio integration-vcs --vcs github --action addRoleToPR --login scanio-bot --role REVIEWER https://github.com/scan-io-git/scan-io/pull/1
scanio integration-vcs --vcs github --action addRoleToPR --role REVIEWER https://github.com/scan-io-git/scan-io/pull/1
# Change the status of the PR
scanio integration-vcs --vcs github --action setStatusOfPR --domain github.com --namespace scan-io-git --repository scan-io --pull-request-id 1 --login scanio-bot --status UNAPPROVED
scanio integration-vcs --vcs github --action setStatusOfPR --domain github.com --namespace scan-io-git --repository scan-io --pull-request-id 1 --status UNAPPROVED
# Change the status of the PR using URL
scanio integration-vcs --vcs github --action setStatusOfPR --login scanio-bot --status UNAPPROVED https://github.com/scan-io-git/scan-io/pull/1
scanio integration-vcs --vcs github --action setStatusOfPR --status UNAPPROVED https://github.com/scan-io-git/scan-io/pull/1
# Leave a comment on the PR with text directly
scanio integration-vcs --vcs github --action addComment --domain github.com --namespace scan-io-git --repository scan-io --pull-request-id 1 --comment "Hello username"
Expand Down
3 changes: 0 additions & 3 deletions cmd/integration-vcs/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ func validateIntegrationVCSArgs(options *vcsintegrator.RunOptionsIntegrationVCS,
if err := validateCommonArgs(options, args); err != nil {
return err
}
if options.Login == "" {
return fmt.Errorf("the 'login' flag must be specified")
}
if options.Status == "" {
return fmt.Errorf("the 'status' flag must be specified")
}
Expand Down
1 change: 0 additions & 1 deletion cmd/list/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ func validateListArgs(options *vcsintegrator.RunOptionsIntegrationVCS, args []st
if err != nil {
return fmt.Errorf("provided URL is not valid: %w", err)
}
return nil
} else if options.Domain == "" {
return fmt.Errorf("the 'domain' flag must be specified")
}
Expand Down
44 changes: 7 additions & 37 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,27 +1,22 @@
module github.com/scan-io-git/scan-io

go 1.19
go 1.23.4

require (
github.com/aws/aws-sdk-go v1.44.114
github.com/gitsight/go-vcsurl v1.0.0
github.com/go-git/go-git/v5 v5.12.0
github.com/go-resty/resty/v2 v2.7.0
github.com/google/go-github/v47 v47.1.1-0.20220922183808-8a4bdb5e400f
github.com/google/uuid v1.3.0
github.com/hashicorp/go-hclog v1.6.3
github.com/hashicorp/go-plugin v1.6.1
github.com/owenrumney/go-sarif/v2 v2.2.0
github.com/spf13/cobra v1.5.0
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.9.0
github.com/xanzy/go-gitlab v0.107.0
github.com/stretchr/testify v1.10.0
gitlab.com/gitlab-org/api/client-go v0.118.0
golang.org/x/crypto v0.21.0
golang.org/x/oauth2 v0.10.0
gopkg.in/yaml.v2 v2.4.0
k8s.io/api v0.28.1
k8s.io/apimachinery v0.28.1
k8s.io/client-go v0.28.1
k8s.io/utils v0.0.0-20230406110748-d93618cff8a2
)

require (
Expand All @@ -31,39 +26,22 @@ require (
github.com/cloudflare/circl v1.3.7 // indirect
github.com/cyphar/filepath-securejoin v0.2.4 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/emicklei/go-restful/v3 v3.9.0 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-git/go-billy/v5 v5.5.0 // indirect
github.com/go-logr/logr v1.2.4 // indirect
github.com/go-openapi/jsonpointer v0.19.6 // indirect
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.3 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.7 // indirect
github.com/hashicorp/yamux v0.1.1 // indirect
github.com/imdario/mergo v0.3.12 // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mitchellh/go-testing-interface v0.0.0-20171004221916-a61a99592b77 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
Expand All @@ -72,22 +50,14 @@ require (
github.com/xanzy/ssh-agent v0.3.3 // indirect
golang.org/x/mod v0.12.0 // indirect
golang.org/x/net v0.22.0 // indirect
golang.org/x/oauth2 v0.10.0 // indirect
golang.org/x/sys v0.20.0 // indirect
golang.org/x/term v0.18.0 // indirect
golang.org/x/text v0.14.0 // indirect
golang.org/x/time v0.3.0 // indirect
golang.org/x/tools v0.13.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20230711160842-782d3b101e98 // indirect
google.golang.org/grpc v1.58.3 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
google.golang.org/protobuf v1.36.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/klog/v2 v2.100.1 // indirect
k8s.io/kube-openapi v0.0.0-20230717233707-2695361300d9 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect
sigs.k8s.io/yaml v1.3.0 // indirect
)
Loading

0 comments on commit 616d94b

Please sign in to comment.