MCPcopy Index your code
hub / github.com/MartinHeinz/go-github-app

github.com/MartinHeinz/go-github-app @v0.0.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.1 ↗ · + Follow
27 symbols 88 edges 12 files 8 documented · 30%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Template for GitHub Apps built with Golang

Build, Test and Lint Action Release Action Quality Gate Status Maintainability Test Coverage Go Report Card

Blog Posts - More Information About This Repo

You can find more information about this project/repository and how to use it in following blog post:

  • Soon...

Quick Start

To use this repository as starter for your project you can run configure_project.sh script, which sets up all variables and file names. This way you can avoid configuring and renaming things yourself:

./configure_project.sh \
    APP_ID="54321" \
    INSTALLATION_ID="987654321" \
    WEBHOOK_SECRET="verysecret" \
    KEY_PATH="./github_key.pem" \
    REGISTRY="ghcr.io/<GITHUB_USERNAME>/go-github-app"

Running

make container  # Builds containerized application
make run        # Runs container at localhost

# From another terminal:
curl http://localhost:8080/api/v1/github/pullrequests/octocat/hello-world

Testing

Test are run inside container image, equivalent to the container in which the application runs. To run tests:

make test

Running tests:
?       github.com/MartinHeinz/go-github-app/cmd/app    [no test files]
ok      github.com/MartinHeinz/go-github-app/cmd/app/apis   0.010s
?       github.com/MartinHeinz/go-github-app/cmd/app/config [no test files]
?       github.com/MartinHeinz/go-github-app/cmd/app/httputil   [no test files]
?       github.com/MartinHeinz/go-github-app/cmd/app/test_data  [no test files]
?       github.com/MartinHeinz/go-github-app/cmd/app/utils  [no test files]
ok      github.com/MartinHeinz/go-github-app/cmd/app/webhooks   0.006s
?       github.com/MartinHeinz/go-github-app/pkg    [no test files]

Checking gofmt: PASS

Checking go vet: PASS

CI/CD

Predefined CI/CD uses GitHub Actions:

  • Build, Test, Lint Workflow (build.yaml):

    • Builds binary and container image
    • Runs tests and generates code coverage report
    • Performs SonarCloud code analysis
    • Sends coverage starts to CodeClimate
  • Release Workflow (release.yaml, triggered on tag creation):

    • Builds container image
    • Pushes the image to GitHub container registry

Core symbols most depended-on inside this repo

GetPullRequests
called by 2
cmd/app/apis/github.go
VerifySignature
called by 2
cmd/app/webhooks/github.go
LoadConfig
called by 2
cmd/app/config/config.go
InitGitHubClient
called by 1
cmd/app/utils/utils.go
GetPullRequestsPaginated
called by 1
cmd/app/apis/github.go
GetTestCaseFolder
called by 1
cmd/app/test_data/init.go
main
called by 0
cmd/app/main.go
NewError
called by 0
cmd/app/httputil/error.go

Shape

Function 22
Struct 4
TypeAlias 1

Languages

Go100%

Modules by API surface

cmd/app/webhooks/github.go7 symbols
cmd/app/webhooks/webhook_test.go4 symbols
cmd/app/apis/github_test.go3 symbols
cmd/app/webhooks/github_test.go2 symbols
cmd/app/test_data/init.go2 symbols
cmd/app/httputil/error.go2 symbols
cmd/app/config/config.go2 symbols
cmd/app/apis/github.go2 symbols
cmd/app/webhooks/models.go1 symbols
cmd/app/utils/utils.go1 symbols
cmd/app/main.go1 symbols

For agents

$ claude mcp add go-github-app \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact