Git Product home page Git Product logo

pr-deadline's Introduction

PR Deadline

Adds a 'late' label to PRs which haven't been made before the end of the sprint.

Setup

  1. Clone this repo

    git clone https://github.com/jack-lewin/pr-deadline

    cd pr-deadline

  2. Create a new Heroku app and deploy the application

    For instructions on doing this, see 'Getting Started on Heroku with Node.js'.

  3. Create a GitHub app

    On your GitHub account settings, go to 'Developer settings' -> 'OAuth Apps'.

    Click 'Register a new application' and enter relevant details.

    The authorization callback URL is https://YOUR-HEROKU-APP-NAME-HERE.herokuapp.com/auth.

  4. Define the following Heroku config variables:

    OWNER - the owner of the repo.

    REPO - to name of the repo.

    CLIENT_ID - as per the GitHub app you created in step 3.

    CLIENT_SECRET - as per the GitHub app you created in step 3.

    SPRINT_END_DAY - the number of the last day of the sprint (e.g. Monday is 1) - defaults to 5 (Friday).

    SPRINT_END_HOUR - the hour PR deadline (e.g. 7pm is 19) - defaults to 12 (midday).

  5. Generate an access token

    Get an access token for the app, by going to https://YOUR-HEROKU-APP-NAME-HERE.herokuapp.com.

    You'll be redirected to GitHub, where you can authorize the app to use your GitHub profile.

    You'll return to the app, and receive an access token: save this as your ACCESS_TOKEN config variable.

  6. Set up a webhook for the repo

    On the GitHub repo settings, go to 'Webhooks' and click 'Add webhook'.

    Enter your Heroku app URL, and set the content-type to be application/json.

    Click 'let me select individual events', and select 'pull request'.

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.