51 Commits

Author SHA1 Message Date
argoyle ab263ad2be Merge pull request 'chore(release): prepare for v0.3.0' (#99) from next-release into main
Release / release (push) Successful in 1m57s
presenter / test (push) Successful in 5m54s
presenter / vulnerabilities (push) Successful in 6m3s
pre-commit / pre-commit (push) Successful in 9m19s
Reviewed-on: #99
2026-01-09 09:01:56 +00:00
releaser e53a54e58c chore(release): prepare for v0.3.0 2026-01-09 09:00:28 +00:00
releaser 018444c022 chore(release): prepare for v0.3.0 2026-01-09 09:00:20 +00:00
argoyle 4a4fe3d5c8 Merge pull request 'ci: add pre-commit and release workflows' (#112) from add-workflows into main
Release / release (push) Successful in 1m29s
presenter / test (push) Successful in 3m6s
presenter / vulnerabilities (push) Successful in 3m16s
pre-commit / pre-commit (push) Has been cancelled
Reviewed-on: #112
2026-01-09 08:58:03 +00:00
argoyle 65aba3a47c ci: add pre-commit and release workflows
presenter / test (pull_request) Successful in 2m26s
presenter / vulnerabilities (pull_request) Successful in 2m26s
pre-commit / pre-commit (pull_request) Successful in 7m54s
2026-01-09 09:48:25 +01:00
argoyle e565f7b147 Merge pull request 'fix: update module path from gitlab to git.unbound.se' (#113) from update-module-path-git-unbound into main
presenter / vulnerabilities (push) Successful in 3m12s
presenter / test (push) Successful in 3m25s
Reviewed-on: #113
2026-01-09 08:47:37 +00:00
argoyle 44464c0a85 fix: update module path from gitlab to git.unbound.se
presenter / test (pull_request) Successful in 2m3s
presenter / vulnerabilities (pull_request) Successful in 2m28s
Change the module path in various files to reflect the new 
repository location on git.unbound.se. Update imports in 
CLAUDE.md, error_test.go, and presenter_test.go to ensure 
compatibility with the updated module path. Remove outdated 
CI configuration in .pre-commit-config.yaml to streamline 
the setup. This enhances consistency and aligns the project 
with its new hosting platform.
2026-01-09 09:26:03 +01:00
argoyle 45c18ccef6 Merge pull request 'chore(deps): update pre-commit hook golangci/golangci-lint to v2.8.0' (#111) from renovate/golangci-golangci-lint-2.x into main
presenter / test (push) Successful in 1m58s
presenter / vulnerabilities (push) Successful in 2m0s
Reviewed-on: #111
2026-01-09 04:13:14 +00:00
renovate 61f079354d chore(deps): update pre-commit hook golangci/golangci-lint to v2.8.0
presenter / test (pull_request) Successful in 5m26s
presenter / vulnerabilities (pull_request) Successful in 5m55s
2026-01-08 21:23:40 +00:00
argoyle b19d1fa250 Merge pull request 'chore(deps): update actions/setup-go action to v6' (#110) from renovate/actions-setup-go-6.x into main
presenter / vulnerabilities (push) Successful in 3m4s
presenter / test (push) Successful in 3m53s
Reviewed-on: #110
2026-01-08 19:21:41 +00:00
renovate 0f1ee07348 chore(deps): update actions/setup-go action to v6
presenter / test (pull_request) Successful in 3m22s
presenter / vulnerabilities (pull_request) Successful in 3m48s
2026-01-08 19:15:59 +00:00
argoyle 773cf10d05 Merge pull request 'chore(deps): update actions/checkout action to v6' (#109) from renovate/actions-checkout-6.x into main
presenter / test (push) Successful in 3m58s
presenter / vulnerabilities (push) Successful in 3m27s
Reviewed-on: #109
2026-01-08 18:30:26 +00:00
renovate 038ef213bb chore(deps): update actions/checkout action to v6
presenter / test (pull_request) Successful in 6m13s
presenter / vulnerabilities (pull_request) Successful in 6m16s
2026-01-08 18:12:09 +00:00
argoyle c35239b385 Merge pull request 'feat: migrate from GitLab CI to Gitea Actions' (#108) from feat/gitea-actions into main
presenter / vulnerabilities (push) Successful in 1m6s
presenter / test (push) Successful in 1m9s
Reviewed-on: #108
2026-01-08 17:57:29 +00:00
argoyle 7644c6793e feat: migrate from GitLab CI to Gitea Actions
presenter / vulnerabilities (pull_request) Successful in 1m5s
presenter / test (pull_request) Successful in 2m10s
2026-01-08 18:34:23 +01:00
Unbound Release cba9bb814d chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
Unbound Release e998aa8599 chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
Unbound Release a8a7fae14b chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
Unbound Release d092bb4158 chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
Unbound Release e7733a069d chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
Unbound Release 90518df4be chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
Unbound Release d007daed7a chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
Unbound Release a4eb50c45a chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
Unbound Release b309cf5fc7 chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
Unbound Release 824e3703a9 chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
Unbound Release aab014650e chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
Unbound Release 51dc2e8605 chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
Unbound Release b0d63489ea chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
Unbound Release 621e039ccf chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
Unbound Release 1b6d69f5f1 chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
Unbound Release 32887d6002 chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
Unbound Release 044226072b chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
Unbound Release 03b493c2e3 chore(release): prepare for v0.2.3 2025-12-31 21:16:29 +00:00
argoyle 147fb3ab15 Merge branch 'claude-docs' into 'main'
docs: add CLAUDE.md for Claude Code integration

See merge request unboundsoftware/shiny/presenter!106
2025-12-31 22:15:17 +01:00
argoyle ac93eacbbc docs: add CLAUDE.md for Claude Code integration 2025-12-31 22:11:47 +01:00
argoyle e96ce57940 Merge branch 'renovate/golang-1.25.5' into 'main'
chore(deps): update golang:1.25.5 docker digest to ad03ba9

See merge request unboundsoftware/shiny/presenter!105
2025-12-30 15:56:02 +01:00
Renovate 923e6a5585 chore(deps): update golang:1.25.5 docker digest to ad03ba9 2025-12-30 03:56:06 +00:00
argoyle b2617b1eb2 Merge branch 'renovate/github.com-99designs-gqlgen-0.x' into 'main'
fix(deps): update module github.com/99designs/gqlgen to v0.17.85

See merge request unboundsoftware/shiny/presenter!104
2025-12-17 08:27:13 +01:00
Renovate 023d0ed776 fix(deps): update module github.com/99designs/gqlgen to v0.17.85 2025-12-17 03:07:32 +00:00
argoyle f7c85d1e56 Merge branch 'renovate/golang-1.25.5' into 'main'
chore(deps): update golang:1.25.5 docker digest to 0c27bcf

See merge request unboundsoftware/shiny/presenter!103
2025-12-09 09:53:35 +01:00
Renovate f6632726c5 chore(deps): update golang:1.25.5 docker digest to 0c27bcf 2025-12-09 02:09:10 +00:00
argoyle 1d58e4afb1 Merge branch 'renovate/golangci-golangci-lint-2.x' into 'main'
chore(deps): update pre-commit hook golangci/golangci-lint to v2.7.2

See merge request unboundsoftware/shiny/presenter!102
2025-12-08 09:41:03 +01:00
Renovate 1b7274b421 chore(deps): update pre-commit hook golangci/golangci-lint to v2.7.2 2025-12-07 16:56:33 +00:00
argoyle e7bea420a7 Merge branch 'renovate/golangci-golangci-lint-2.x' into 'main'
chore(deps): update pre-commit hook golangci/golangci-lint to v2.7.1

See merge request unboundsoftware/shiny/presenter!101
2025-12-04 16:24:20 +01:00
Renovate 14b00f06d3 chore(deps): update pre-commit hook golangci/golangci-lint to v2.7.1 2025-12-04 14:56:55 +00:00
argoyle b286d56403 Merge branch 'renovate/golangci-golangci-lint-2.x' into 'main'
chore(deps): update pre-commit hook golangci/golangci-lint to v2.7.0

See merge request unboundsoftware/shiny/presenter!100
2025-12-04 08:28:03 +01:00
Renovate 5c1b8981d1 chore(deps): update pre-commit hook golangci/golangci-lint to v2.7.0 2025-12-03 19:56:19 +00:00
argoyle 9bb84fb008 Merge branch 'renovate/golang-1.x' into 'main'
chore(deps): update golang docker tag to v1.25.5

See merge request unboundsoftware/shiny/presenter!99
2025-12-02 19:39:54 +01:00
Renovate a3c4bcfe0f chore(deps): update golang docker tag to v1.25.5 2025-12-02 18:08:38 +00:00
argoyle 6deb62064d Merge branch 'renovate/gitleaks-gitleaks-8.x' into 'main'
chore(deps): update pre-commit hook gitleaks/gitleaks to v8.30.0

See merge request unboundsoftware/shiny/presenter!97
2025-11-27 00:03:58 +01:00
Renovate eb8cefdc83 chore(deps): update pre-commit hook gitleaks/gitleaks to v8.30.0 2025-11-26 18:56:37 +00:00
14 changed files with 150 additions and 22 deletions
+30
View File
@@ -0,0 +1,30 @@
name: presenter
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: 'stable'
- name: Run tests
run: go test -race -coverprofile=coverage.txt ./...
vulnerabilities:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: 'stable'
- name: Check vulnerabilities
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
govulncheck ./...
+25
View File
@@ -0,0 +1,25 @@
name: pre-commit
permissions: read-all
on:
pull_request:
push:
branches:
- main
jobs:
pre-commit:
runs-on: ubuntu-latest
env:
SKIP: no-commit-to-branch
steps:
- uses: actions/checkout@v6
- uses: actions/setup-go@v6
with:
go-version: stable
- uses: actions/setup-python@v5
with:
python-version: '3.14'
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- uses: pre-commit/action@v3.0.1
+9
View File
@@ -0,0 +1,9 @@
name: Release
on:
push:
branches: [main]
jobs:
release:
uses: unboundsoftware/shared-workflows/.gitea/workflows/Release.yml@main
+1
View File
@@ -1,2 +1,3 @@
.idea .idea
.claude
/release /release
+2 -2
View File
@@ -7,7 +7,7 @@ include:
- project: unboundsoftware/ci-templates - project: unboundsoftware/ci-templates
file: Pre-Commit-Go.gitlab-ci.yml file: Pre-Commit-Go.gitlab-ci.yml
image: amd64/golang:1.25.4@sha256:efe81fa41fdf81fb873ab7cd931b9bb29bd10aced6c252cbd91739c34e654f01 image: amd64/golang:1.25.5@sha256:ad03ba93327b8a6143b49373790b5d92c28067bdb814418509466122ee9c9e63
stages: stages:
- deps - deps
@@ -32,7 +32,7 @@ test:
vulnerabilities: vulnerabilities:
stage: test stage: test
image: amd64/golang:1.25.4@sha256:efe81fa41fdf81fb873ab7cd931b9bb29bd10aced6c252cbd91739c34e654f01 image: amd64/golang:1.25.5@sha256:ad03ba93327b8a6143b49373790b5d92c28067bdb814418509466122ee9c9e63
script: script:
- go install golang.org/x/vuln/cmd/govulncheck@latest - go install golang.org/x/vuln/cmd/govulncheck@latest
- govulncheck ./... - govulncheck ./...
+3 -10
View File
@@ -10,13 +10,6 @@ repos:
args: args:
- --allow-multiple-documents - --allow-multiple-documents
- id: check-added-large-files - id: check-added-large-files
- repo: https://gitlab.com/devopshq/gitlab-ci-linter
rev: v1.0.6
hooks:
- id: gitlab-ci-linter
args:
- --project
- unboundsoftware/shiny/presenter
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook - repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.23.0 rev: v9.23.0
hooks: hooks:
@@ -30,17 +23,17 @@ repos:
- id: go-imports - id: go-imports
args: args:
- -local - -local
- gitlab.com/unboundsoftware/shiny/presenter - git.unbound.se/shiny/presenter
- repo: https://github.com/lietu/go-pre-commit - repo: https://github.com/lietu/go-pre-commit
rev: v1.0.0 rev: v1.0.0
hooks: hooks:
- id: go-test - id: go-test
- id: gofumpt - id: gofumpt
- repo: https://github.com/golangci/golangci-lint - repo: https://github.com/golangci/golangci-lint
rev: v2.6.2 rev: v2.8.0
hooks: hooks:
- id: golangci-lint-full - id: golangci-lint-full
- repo: https://github.com/gitleaks/gitleaks - repo: https://github.com/gitleaks/gitleaks
rev: v8.29.1 rev: v8.30.0
hooks: hooks:
- id: gitleaks - id: gitleaks
+3 -1
View File
@@ -1 +1,3 @@
{"version":"v0.2.2"} {
"version": "v0.3.0"
}
+29
View File
@@ -2,6 +2,35 @@
All notable changes to this project will be documented in this file. All notable changes to this project will be documented in this file.
## [0.3.0] - 2026-01-09
### 🚀 Features
- Migrate from GitLab CI to Gitea Actions
### 🐛 Bug Fixes
- *(deps)* Update module github.com/99designs/gqlgen to v0.17.85
- Update module path from gitlab to git.unbound.se
### 📚 Documentation
- Add CLAUDE.md for Claude Code integration
### ⚙️ Miscellaneous Tasks
- *(deps)* Update pre-commit hook gitleaks/gitleaks to v8.30.0
- *(deps)* Update golang docker tag to v1.25.5
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.7.0
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.7.1
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.7.2
- *(deps)* Update golang:1.25.5 docker digest to 0c27bcf
- *(deps)* Update golang:1.25.5 docker digest to ad03ba9
- *(deps)* Update actions/checkout action to v6
- *(deps)* Update actions/setup-go action to v6
- *(deps)* Update pre-commit hook golangci/golangci-lint to v2.8.0
- Add pre-commit and release workflows
## [0.2.2] - 2025-11-24 ## [0.2.2] - 2025-11-24
### 🐛 Bug Fixes ### 🐛 Bug Fixes
+42
View File
@@ -0,0 +1,42 @@
# presenter
Shared Go library for GraphQL error presentation with coded errors.
## Shared Documentation
@../docs/claude/architecture.md
@../docs/claude/go-services.md
@../docs/claude/graphql.md
@../docs/claude/conventions.md
## Library Information
### Purpose
Provides a standardized GraphQL error presenter that handles coded errors across all microservices. Converts internal error codes to GraphQL error extensions.
### Usage
```go
import "git.unbound.se/shiny/presenter"
// Create error presenter with valid codes and entities
errorPresenter := presenter.New(logger, validCodes, validEntities, internalErrorCode)
// Use in gqlgen server config
srv := handler.NewDefaultServer(generated.NewExecutableSchema(cfg))
srv.SetErrorPresenter(errorPresenter)
```
### Key Types
- `CodedError` - Error type with code, entity, and params
- `Code` - Error code type
- `Entity` - Error entity type
### Error Extensions
Errors are presented with extensions:
- `code` - The error code (mapped to valid codes or internal error)
- `errorEntity` - The entity related to the error (optional)
- `params` - Additional error parameters (optional)
-3
View File
@@ -1,6 +1,3 @@
# Shiny global error presenter # Shiny global error presenter
GraphQL global error presenter handling coded errors. GraphQL global error presenter handling coded errors.
[![Build Status](https://gitlab.com/unboundsoftware/shiny/presenter/badges/main/pipeline.svg)](https://gitlab.com/unboundsoftware/shiny/presenter/commits/main)
[![codecov](https://codecov.io/gl/unboundsoftware:shiny/presenter/branch/main/graph/badge.svg?token=8F3HKACF7A)](https://codecov.io/gl/unboundsoftware:shiny/presenter)
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"github.com/stretchr/testify/require" "github.com/stretchr/testify/require"
"gitlab.com/unboundsoftware/shiny/presenter" "git.unbound.se/shiny/presenter"
) )
func TestCodedError_ErrorIs(t *testing.T) { func TestCodedError_ErrorIs(t *testing.T) {
+2 -2
View File
@@ -1,9 +1,9 @@
module gitlab.com/unboundsoftware/shiny/presenter module git.unbound.se/shiny/presenter
go 1.24.1 go 1.24.1
require ( require (
github.com/99designs/gqlgen v0.17.84 github.com/99designs/gqlgen v0.17.85
github.com/stretchr/testify v1.11.1 github.com/stretchr/testify v1.11.1
github.com/vektah/gqlparser/v2 v2.5.31 github.com/vektah/gqlparser/v2 v2.5.31
) )
+2 -2
View File
@@ -1,5 +1,5 @@
github.com/99designs/gqlgen v0.17.84 h1:iVMdiStgUVx/BFkMb0J5GAXlqfqtQ7bqMCYK6v52kQ0= github.com/99designs/gqlgen v0.17.85 h1:EkGx3U2FDcxQm8YDLQSpXIAVmpDyZ3IcBMOJi2nH1S0=
github.com/99designs/gqlgen v0.17.84/go.mod h1:qjoUqzTeiejdo+bwUg8unqSpeYG42XrcrQboGIezmFA= github.com/99designs/gqlgen v0.17.85/go.mod h1:yvs8s0bkQlRfqg03YXr3eR4OQUowVhODT/tHzCXnbOU=
github.com/agnivade/levenshtein v1.2.1 h1:EHBY3UOn1gwdy/VbFwgo4cxecRznFk7fKWN1KOX7eoM= 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/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= github.com/andreyvit/diff v0.0.0-20170406064948-c7f18ee00883 h1:bvNMNQO63//z+xNgfBlViaCIJKLlCJ6/fmUseuG0wVQ=
+1 -1
View File
@@ -11,7 +11,7 @@ import (
"github.com/stretchr/testify/assert" "github.com/stretchr/testify/assert"
"github.com/vektah/gqlparser/v2/gqlerror" "github.com/vektah/gqlparser/v2/gqlerror"
"gitlab.com/unboundsoftware/shiny/presenter" "git.unbound.se/shiny/presenter"
) )
func Test_globalErrorPresenter(t *testing.T) { func Test_globalErrorPresenter(t *testing.T) {