Coder Social home page Coder Social logo

twin / go-github-wip Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 438 KB

DEPRECATED - Application that creates a check run on PRs that have a title starting with [WIP]

License: Apache License 2.0

Dockerfile 3.04% Go 96.96%
github github-app go golang

go-github-wip's Introduction

go-github-wip

Docker pulls

go-github-wip is an application that creates a GitHub check run on pull requests that have a title starting with [WIP]. This is used in order to prevent collaborators from accidentally merging a PR that isn't completed yet.

Table of Contents

Usage

Pull the image from Docker Hub:

docker pull twinproduction/go-github-wip:latest

Run it:

docker run --name go-github-wip -p 0.0.0.0:8080:8080 twinproduction/go-github-wip

Github App Requirements

Permissions

Permission Access Use
Checks Read & Write Create a check suite to prevent users from merging
Issues Read Check whether an issue already has a label associated to it
Pull requests Read & Write Create and delete a label from a PR

Events

  • Pull request

Environment variables

You must set GO_GITHUB_WIP_APP_PRIVATE_KEY to the name of the file containing your Github App private key.

e.g.

GO_GITHUB_WIP_APP_PRIVATE_KEY="github-app-private-key.pem"

You must also specify the ID of your GitHub application using GO_GITHUB_WIP_APP_ID:

GO_GITHUB_WIP_APP_ID="12345"

If you wish, you can also configure the prefix that will trigger setting a PR as work in progress by setting GO_GITHUB_WIP_PREFIXES. The values are comma separated, meaning that WIP!,[WIP] would set both WIP! and [WIP] as prefixes. If no prefixes are defined, it will default to WIP and [WIP].

GO_GITHUB_WIP_PREFIXES="WIP,[WIP]"

Optionally, you can also enable debugging by setting the GO_GITHUB_WIP_DEBUG to true:

GO_GITHUB_WIP_DEBUG="true"

Building locally

docker build . -t go-github-wip

go-github-wip's People

Contributors

twin avatar

Watchers

James Cloos avatar  avatar  avatar

go-github-wip's Issues

Support enterprise GitHub

Add another environment variable (e.g. GO_GITHUB_WIP_ENTERPRISE_URL), and on init, check if that environment variable exists. If it does, then createGithubClient should create an enterprise GitHub client instead of the default GitHub client.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.