-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: codegen the context from GraphQL schema (#4)
* feat: codegen the context from GraphQL schema * fix: use 'task seutp' in golangci-lint linter * fix: use 'task seutp' in govulncheck * fix: remove dependcy check * ci: test scm-engine against live gitlab project * fix: change go module name to scm-engine * fix: 'go::test' example should only trigger if Go files are changed * ci: reduce steps in ci 'build' step
- Loading branch information
Showing
33 changed files
with
447 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,14 @@ jobs: | |
with: | ||
go-version-file: go.mod | ||
|
||
- uses: arduino/setup-task@v2 | ||
with: | ||
version: 3.x | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: setup | ||
run: task setup | ||
|
||
- name: install govulncheck | ||
run: go install golang.org/x/vuln/cmd/govulncheck@latest | ||
|
||
|
@@ -66,37 +74,22 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- uses: arduino/setup-task@v2 | ||
with: | ||
version: 3.x | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- uses: docker/setup-qemu-action@v3 | ||
# - uses: docker/setup-qemu-action@v3 | ||
|
||
- uses: docker/setup-buildx-action@v3 | ||
|
||
- name: setup-snapcraft | ||
# FIXME: the mkdirs are a hack for https://github.com/goreleaser/goreleaser/issues/1715 | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -yq --no-install-suggests --no-install-recommends install snapcraft | ||
mkdir -p $HOME/.cache/snapcraft/download | ||
mkdir -p $HOME/.cache/snapcraft/stage-packages | ||
# - uses: docker/setup-buildx-action@v3 | ||
|
||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version-file: go.mod | ||
|
||
- uses: sigstore/[email protected] | ||
|
||
- uses: anchore/sbom-action/[email protected] | ||
|
||
- name: setup-validate-krew-manifest | ||
run: go install sigs.k8s.io/krew/cmd/validate-krew-manifest@latest | ||
|
||
- name: setup-tparse | ||
run: go install github.com/mfridman/tparse@latest | ||
|
||
- uses: arduino/setup-task@v2 | ||
with: | ||
version: 3.x | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: setup | ||
run: | | ||
task setup | ||
|
@@ -110,6 +103,16 @@ jobs: | |
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
|
||
- run: ./scm-engine -h | ||
- name: Ensure scm-engine binary work | ||
run: ./scm-engine -h | ||
|
||
- name: Test scm-engine against test GitLab project | ||
run: ./scm-engine evaluate 1 | ||
env: | ||
SCM_ENGINE_CONFIG_FILE: ".scm-engine.example.yml" | ||
SCM_ENGINE_TOKEN: "${{ secrets.GITLAB_INTEGRATION_TEST_API_TOKEN }}" | ||
GITLAB_PROJECT: "jippi/scm-engine-schema-test" | ||
GITLAB_BASEURL: https://gitlab.com/ | ||
|
||
- run: git diff | ||
- name: Show any diff that may be in the project | ||
run: git diff |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,8 +9,9 @@ bin/ | |
completions/ | ||
coverage.txt | ||
dist/ | ||
/schema/*/ignore | ||
manpages/ | ||
scm-engine | ||
scm-engine.exe | ||
|
||
*.gen.go | ||
!.env.example |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ env: | |
|
||
before: | ||
hooks: | ||
- go mod tidy | ||
- task setup | ||
# - ./scripts/completions.sh | ||
# - ./scripts/manpages.sh | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,37 @@ | ||
module github.com/jippi/gitlab-labeller | ||
module github.com/jippi/scm-engine | ||
|
||
go 1.22.2 | ||
|
||
require ( | ||
github.com/99designs/gqlgen v0.17.45 | ||
github.com/davecgh/go-spew v1.1.1 | ||
github.com/expr-lang/expr v1.16.5 | ||
github.com/fatih/structtag v1.2.0 | ||
github.com/go-playground/webhooks/v6 v6.3.0 | ||
github.com/guregu/null/v5 v5.0.0 | ||
github.com/hasura/go-graphql-client v0.12.1 | ||
github.com/iancoleman/strcase v0.3.0 | ||
github.com/urfave/cli/v2 v2.27.2 | ||
github.com/vektah/gqlparser/v2 v2.5.11 | ||
github.com/xanzy/go-gitlab v0.104.0 | ||
github.com/xhit/go-str2duration/v2 v2.1.0 | ||
golang.org/x/oauth2 v0.20.0 | ||
gopkg.in/yaml.v3 v3.0.1 | ||
) | ||
|
||
require ( | ||
github.com/agnivade/levenshtein v1.1.1 // indirect | ||
github.com/cpuguy83/go-md2man/v2 v2.0.4 // indirect | ||
github.com/google/go-querystring v1.1.0 // indirect | ||
github.com/google/uuid v1.6.0 // indirect | ||
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect | ||
github.com/hashicorp/go-retryablehttp v0.7.2 // indirect | ||
github.com/russross/blackfriday/v2 v2.1.0 // indirect | ||
github.com/sosodev/duration v1.2.0 // indirect | ||
github.com/xrash/smetrics v0.0.0-20240312152122-5f08fbb34913 // indirect | ||
golang.org/x/mod v0.16.0 // indirect | ||
golang.org/x/text v0.14.0 // indirect | ||
golang.org/x/time v0.3.0 // indirect | ||
golang.org/x/tools v0.19.0 // indirect | ||
nhooyr.io/websocket v1.8.11 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.