• Stars
    star
    59
  • Rank 509,601 (Top 11 %)
  • Language
    Go
  • License
    MIT License
  • Created almost 3 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Template for building GitHub Apps in Go.

Template for GitHub Apps built with Golang

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


If you find this useful, you can support me on Ko-Fi (Donations are always appreciated, but never required):

ko-fi

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:

Building GitHub Apps with Golang

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

More Repositories

1

python-project-blueprint

Blueprint/Boilerplate For Python Projects
Makefile
931
star
2

go-project-blueprint

Blueprint/Boilerplate For Golang Projects
Makefile
471
star
3

MartinHeinz

My GitHub Profile README. Don't just fork, star it, so others can find it too! 👀
379
star
4

physics-visual

Visualization/Simulation of 2D physics concepts
JavaScript
109
star
5

blog-backend

Personal Blog
Go
62
star
6

ga-extractor

Tool for extracting Google Analytics data suitable for migrating to other platforms/databases
Python
45
star
7

tekton-kickstarter

Templates, scripts and samples for quickly building CI/CD with Tekton.
Makefile
43
star
8

cli-showcase-setup

Go
35
star
9

workflows

GitHub Actions-based reusable CI/CD workflows
32
star
10

charts

Collection of Charts and Data Visualizations
JavaScript
28
star
11

blog-frontend

Frontend for personal blog website.
Vue
24
star
12

IoT-Cloud

Privacy friendly framework for IoT Cloud
Python
22
star
13

game-server-operator

Kubernetes Operator for easy deployment of containerized game servers.
Go
18
star
14

kubeadm-vagrant-playground

Shell
13
star
15

openfaas-functions

Various functions for OpenFaaS
Go
11
star
16

openfaas-templates

Various Templates and Notes for OpenFaaS
Shell
10
star
17

remote-debug-python-kubernetes

Shell
8
star
18

dive-action

TypeScript
5
star
19

blog-deploy

Scripts and pipeline for deployment of blog frontend and backend
Shell
5
star
20

metrics-on-kind

Custom and external metrics setup on KinD cluster with Prometheus Operator and Prometheus Adapter
Shell
4
star
21

mastodon-local

Setup for local/playground instance for Mastodon
Dockerfile
3
star
22

github-actions

Testing Github Actions
Dockerfile
3
star
23

LifestyleTracker

Python
3
star
24

application-operator

Kubernetes Operator for deploying whole applications with single CRD.
Go
2
star
25

TicTacToe

Tic-Tac-Toe Java Kata
Java
2
star
26

pipeline-tester

Python
2
star
27

kuberhealthy-custom-checks

Go
2
star
28

openfaas-setup

1
star
29

training-and-food-tracker

Python
1
star
30

k8s-manifests

1
star
31

felsenstein-1981

Implementation of Felsenstein's tree-pruning algorithm
Python
1
star