• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

datatug / backend / 34985092841
87%

Build:
DEFAULT BRANCH: main
Ran 15 Sep 2026 02:57PM UTC
Jobs 1
Files 11
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

15 Sep 2026 02:56PM UTC coverage: 87.395% (+0.2%) from 87.166%
34985092841

push

github

trakhimenok
feat(api): exchange a GitHub OAuth code server-side

Adds POST /v0/datatug/github/oauth_token: the client sends the authorization
code GitHub handed it at the redirect URI, the host trades it for an access
token, and the client gets the token to call GitHub with. This is what lets the
app offer "Sign in with GitHub" instead of asking for a personal access token.

- facade4datatug.GithubOAuthExchanger is a PORT: the exchange needs the OAuth
  app's client secret, which must never reach the browser or this repository.
  The host owns the secret and supplies the adapter (nil when unconfigured, in
  which case the endpoint answers "github sign-in is not configured on this
  server" instead of failing obscurely).
- Facade now carries that port alongside the id generator.
- api4datatug registers the route; datatugext.Extension takes both adapters.

The token is returned to the caller and never stored server-side.

Tests: successful exchange (including that the code and redirect URI reach the
port, since GitHub verifies they match), validation of both fields, an
unconfigured host, a GitHub failure wrapped rather than swallowed, and an empty
token treated as a failure; plus the handler's success and 400 paths.

Coverage 89.3% (gate: 88%); build/vet/test clean.

51 of 57 new or added lines in 7 files covered. (89.47%)

208 of 238 relevant lines covered (87.39%)

0.87 hits per line

Uncovered Changes

Lines Coverage ∆ File
6
76.0
api4datatug/http_github_oauth.go
Jobs
ID Job ID Ran Files Coverage
1 34985092841.1 15 Sep 2026 02:57PM UTC 11
87.39
GitHub Action Run
Source Files on build 34985092841
  • Tree
  • List 11
  • Changed 5
  • Source Changed 0
  • Coverage Changed 5
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 32eedaf7 on github
  • Prev Build on main (#34979458060)
  • Next Build on main (#35017903852)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc