fakegithub

command
v0.7.32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 22, 2026 License: Apache-2.0 Imports: 15 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command fakegithub serves githubtest's fake as a GitHub Enterprise Server built from a seed file, for an exercise that runs an app outside the Go test process, such as one in a container.

go run github.com/panyam/goapplib/storage/mounts/github/githubtest/cmd/fakegithub \
  --seed seed.json --addr 127.0.0.1:7070 --listen 0.0.0.0:7071 --base-url http://host.docker.internal:7071

githubtest.Seed describes the seed file. The fake answers the REST API under /api/v3 as a GHES host does, and sign-in and raw files at its root. --addr serves the control requests that githubtest.Seeded.Control describes: GET / names the fake's addresses, the tags' commits and the App's key and installations, POST /approve approves a device code, and POST /push commits and delivers a push.

--listen and --base-url set where the fake listens and the origin of every URL it hands out, as githubtest.WithListener and WithBaseURL do. --hook-ca names a CA file the fake trusts when it delivers a webhook over TLS.

It is a test tool. Nothing in it is safe to expose beyond a test network.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL