Compare commits
15 Commits
v0.3.0
...
ac19c57724
| Author | SHA1 | Date | |
|---|---|---|---|
| ac19c57724 | |||
|
fb4a1b53c5
|
|||
| f6924a3d10 | |||
| 1f6675f619 | |||
| d7c9a791d5 | |||
| e33987441a | |||
| 5b06a5e584 | |||
| 728ef4f8ae | |||
| ebefb9209e | |||
| 579faa4f12 | |||
|
fad40030e1
|
|||
| c317235773 | |||
| a5b6a3f479 | |||
| 11e134b08f | |||
| 419a82224d |
@@ -17,7 +17,7 @@ jobs:
|
||||
- uses: actions/setup-go@v6
|
||||
with:
|
||||
go-version: stable
|
||||
- uses: actions/setup-python@v5
|
||||
- uses: actions/setup-python@v6
|
||||
with:
|
||||
python-version: '3.14'
|
||||
- name: Install goimports
|
||||
|
||||
@@ -1,38 +0,0 @@
|
||||
include:
|
||||
- template: 'Workflows/MergeRequest-Pipelines.gitlab-ci.yml'
|
||||
- project: unboundsoftware/ci-templates
|
||||
file: Defaults.gitlab-ci.yml
|
||||
- project: unboundsoftware/ci-templates
|
||||
file: Release.gitlab-ci.yml
|
||||
- project: unboundsoftware/ci-templates
|
||||
file: Pre-Commit-Go.gitlab-ci.yml
|
||||
|
||||
image: amd64/golang:1.25.5@sha256:ad03ba93327b8a6143b49373790b5d92c28067bdb814418509466122ee9c9e63
|
||||
|
||||
stages:
|
||||
- deps
|
||||
- test
|
||||
|
||||
deps:
|
||||
stage: deps
|
||||
script:
|
||||
- go mod download
|
||||
|
||||
test:
|
||||
stage: test
|
||||
dependencies:
|
||||
- deps
|
||||
script:
|
||||
- CGO_ENABLED=1 go test -mod=readonly -race -coverprofile=coverage.txt -covermode=atomic -coverpkg=$(go list ./... | tr '\n' , | sed 's/,$//') ./...
|
||||
- go tool cover -html=coverage.txt -o coverage.html
|
||||
- go tool cover -func=coverage.txt
|
||||
- curl -Os https://uploader.codecov.io/latest/linux/codecov
|
||||
- chmod +x codecov
|
||||
- ./codecov -t ${CODECOV_TOKEN} -R $CI_PROJECT_DIR -C $CI_COMMIT_SHA -r $CI_PROJECT_PATH
|
||||
|
||||
vulnerabilities:
|
||||
stage: test
|
||||
image: amd64/golang:1.25.5@sha256:ad03ba93327b8a6143b49373790b5d92c28067bdb814418509466122ee9c9e63
|
||||
script:
|
||||
- go install golang.org/x/vuln/cmd/govulncheck@latest
|
||||
- govulncheck ./...
|
||||
@@ -11,7 +11,7 @@ repos:
|
||||
- --allow-multiple-documents
|
||||
- id: check-added-large-files
|
||||
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
|
||||
rev: v9.23.0
|
||||
rev: v9.24.0
|
||||
hooks:
|
||||
- id: commitlint
|
||||
stages: [ commit-msg ]
|
||||
@@ -23,7 +23,7 @@ repos:
|
||||
- id: go-imports
|
||||
args:
|
||||
- -local
|
||||
- git.unbound.se/shiny/presenter
|
||||
- gitea.unbound.se/shiny/presenter
|
||||
- repo: https://github.com/lietu/go-pre-commit
|
||||
rev: v1.0.0
|
||||
hooks:
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
## [0.3.1] - 2026-01-09
|
||||
|
||||
### ⚙️ Miscellaneous Tasks
|
||||
|
||||
- *(deps)* Update actions/setup-python action to v6
|
||||
- Migrate module path to gitea.unbound.se
|
||||
|
||||
## [0.3.0] - 2026-01-09
|
||||
|
||||
### 🚀 Features
|
||||
|
||||
@@ -18,7 +18,7 @@ Provides a standardized GraphQL error presenter that handles coded errors across
|
||||
### Usage
|
||||
|
||||
```go
|
||||
import "git.unbound.se/shiny/presenter"
|
||||
import "gitea.unbound.se/shiny/presenter"
|
||||
|
||||
// Create error presenter with valid codes and entities
|
||||
errorPresenter := presenter.New(logger, validCodes, validEntities, internalErrorCode)
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import (
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"git.unbound.se/shiny/presenter"
|
||||
"gitea.unbound.se/shiny/presenter"
|
||||
)
|
||||
|
||||
func TestCodedError_ErrorIs(t *testing.T) {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
module git.unbound.se/shiny/presenter
|
||||
module gitea.unbound.se/shiny/presenter
|
||||
|
||||
go 1.24.1
|
||||
|
||||
require (
|
||||
github.com/99designs/gqlgen v0.17.85
|
||||
github.com/99designs/gqlgen v0.17.86
|
||||
github.com/stretchr/testify v1.11.1
|
||||
github.com/vektah/gqlparser/v2 v2.5.31
|
||||
)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
github.com/99designs/gqlgen v0.17.85 h1:EkGx3U2FDcxQm8YDLQSpXIAVmpDyZ3IcBMOJi2nH1S0=
|
||||
github.com/99designs/gqlgen v0.17.85/go.mod h1:yvs8s0bkQlRfqg03YXr3eR4OQUowVhODT/tHzCXnbOU=
|
||||
github.com/99designs/gqlgen v0.17.86 h1:C8N3UTa5heXX6twl+b0AJyGkTwYL6dNmFrgZNLRcU6w=
|
||||
github.com/99designs/gqlgen v0.17.86/go.mod h1:KTrPl+vHA1IUzNlh4EYkl7+tcErL3MgKnhHrBcV74Fw=
|
||||
github.com/agnivade/levenshtein v1.2.1 h1:EHBY3UOn1gwdy/VbFwgo4cxecRznFk7fKWN1KOX7eoM=
|
||||
github.com/agnivade/levenshtein v1.2.1/go.mod h1:QVVI16kDrtSuwcpd0p1+xMC6Z/VfhtCyDIjcwga4/DU=
|
||||
github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ=
|
||||
|
||||
+1
-1
@@ -11,7 +11,7 @@ import (
|
||||
"github.com/stretchr/testify/assert"
|
||||
"github.com/vektah/gqlparser/v2/gqlerror"
|
||||
|
||||
"git.unbound.se/shiny/presenter"
|
||||
"gitea.unbound.se/shiny/presenter"
|
||||
)
|
||||
|
||||
func Test_globalErrorPresenter(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user