github-releaser

command module
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2021 License: MIT Imports: 14 Imported by: 0

README

github-releaser

This tool is designed to perform automated semver tagging of pull requests. Therefore, this tool can be invoked through creating PRs.

TL;DR

In order for this tool to accessible by Repositories, it is required that the docker image is created and exposed in a public URL. See the /Dockerfile

Docker

The docker image expects you to provide at least:

  • GITHUB_APP_ID*
  • GITHUB_WEBHOOK_SECRET*
  • GITHUB_PRIVATE_KEY*
  • GITHUB_ENTERPRISE_URL (optional)

Once running the container will expose the endpoint on port 8080 (or can be set by HTTP_PORT). Once exposed, the webhook receiver URL (which is set in your Github App) needs to point towards the docker image.

Github

This tool is only accessible via Github App, therefore, to install this app you will need to create a Github app and assign it a webhook url which needs to point towards where the Docker image is exposed

1. Permissions

When creating your Github app, make sure that the following permissions are ✅:

  • Contents* (Read & Write)
  • Metadata* (Read-only)
  • Pull Requests* (Read & Write)
2. Events

Also check that the following events are ✅:

  • Pull Request*

Local

It's highly encouraged that you test your changes before integrating your changes to this tool.

In order to install & use this tool locally, you are required to have the following setup before proceeding further:

  1. Github App - You need to create Github App. Follow how to create Github app
  2. Testing Repo - You need a testing repo to test this tool
  3. Server - Required to tunnel webhook URI. Either localhost.run or Cloudflare will do fine
Run

I'm using localhost.run to test the webhook URI, simply because no installation is required and is available by default in the mac terminal, but you're free to chose whichever you prefer.

To run the app locally, you need to ensure the following are running in parallel.

  1. Docker - Either run the docker image, or simply do:
$ go build -a -installsuffix cgo -o main *.go &&& ./main

This will run the app on port 8080 by default.

  1. localhost.run - To tunnel the webhook URI:
$ ssh -R 80:localhost:5000 localhost.run
  1. Trigger Webhook - You can either trigger you webhook manually or create a testing PR in your testing Repo.

Note: If you want to test by creating PR in your testing repo, you first have to make sure that the app is installed and accessible by your repo.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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