Giter Club home page Giter Club logo

sign-off-checker's Introduction

sign-off-checker

This is a simple Go server that listens for web hooks from GitHub for PRs. It then looks at each commit in that PR and sets a status. If all of the commits have a "Signed-off-by" line on them then it marks all of those commits as "success". If any one of them is missing the "Signed-off-by" line then all are marked as "failed".

The status check points to a "CONTRIBUTING.md" file in the repo in question.

Building

You can just go get github.com/heptio/sign-off-checker/cmd/sign-off-checker to get the binary installed locally. To build a docker container do make push REGISTRY=<my-gcr-regisry> from this repo.

Running

There are two environment variables that need to be set when running:

  • SHARED_SECRET: Set this to a random value that you supply as the "secret" when configuring the webhook.
  • GITHUB_TOKEN: Set this to an personal access token for a github user that has access to the repo in question. The webhook doesn't include details of the commits so we have to fetch them. Unforutnately this requires full read/write repo access scope even though we are just reading. Create one of these at https://github.com/settings/tokens.

Run the server someplace. It'll listen at http://<example.com>/webhook. Now head on over to the settings tab of your repo and add a webhook. The Payload URL should be set to the URL. The content type should be application/json and the secret should be the secret above. Select "individual events" and check "Pull request". If things are working you can check the status of the webhook from Githubs point of view on that page.

Build stuff

Taken from https://github.com/thockin/go-build-template

sign-off-checker's People

Contributors

davecheney avatar jbeda avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sign-off-checker's Issues

signoff checker fails github's merge commits

If a branch is out of date github provides a button to bring it up to date, however these commits contain no signed-off field so fail the checker.

It would be nice if the checker ignored these commits.

Add "force reregister" command

There are some ways for the current autoregistration to get stuck (e.g., if the shared secret changes). We should add a command to force reregistration on all repos.

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.