This repository has been archived by the owner. It is now read-only.
pastamaker is a Github App to automatically manage Pull Requests "branch update" and "merge"
Switch branches/tags
Nothing to show
Clone or download
Latest commit 1fda2bf Apr 14, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
pastamaker fix py3 Apr 14, 2018
ui Continue new ui Apr 8, 2018
.gitignore Add vue.js ui Mar 30, 2018
.travis.yml Add travis config Jun 12, 2017
LICENSE Add the LICENSE file Jul 10, 2017
README.rst Update README.rst Mar 26, 2018
config.yml Fix github enrollement workflow Apr 12, 2018
dashboard.jpg Change screenshot name Jul 27, 2017
default_policy.yml Read branch policies from repository Mar 30, 2018
gnocchixyz_policy.yml Add gnocchixyz policies Apr 13, 2018
setup.cfg Validate user configuration Mar 30, 2018
setup.py Remove pbr Mar 28, 2018
tox.ini Fix pep8 Apr 12, 2018

README.rst

pastamaker

Build Status

pastamaker is a Github App to automatically manage Pull Requests "branch update" and "merge" when this one have 2 reviewer approvals

It's currently used by gnocchixyz projects, the app name is 'pastamaker'.

Github App Settings

You should obviously replace https://<app-name>.herokuapp.com by the url where you host the application.

General

  • Homepage URL: https://<app-name>.herokuapp.com
  • User authorization callback URL: https://<app-name>.herokuapp.com/auth
  • Setup URL: None
  • Webhook URL: https://<app-name>.herokuapp.com/event
  • Webhook secret: <webhook_secret>
  • Generate the private key: # Click on the button #

Pick the ID on the right, you will need it later.

Permissions

Commit statuses - ReadWrite

  [x] Status

Pull requests - ReadWrite

  [x] Pull request
  [x] Pull request review
  [x] Pull request review comment

Repository contents - ReadWrite

  No webook

Heroku Setup

heroku apps:create <app-name>
heroku addons:create redistogo:nano
heroku addons:create scheduler:standard

heroku config:set -a <app-name> \
    PASTAMAKER_INTEGRATION_ID=XXXX \
    PASTAMAKER_WEBHOOK_SECRET="<webhook_secret>" \
    PASTAMAKER_PRIVATE_KEY="$(cat <path to the private key>)" \
    PASTAMAKER_BASE_URL="https://<app-name>.herokuapp.com" \
    PASTAMAKER_WEBHACK_USERNAME="<app-name>-bot" \
    PASTAMAKER_WEBHACK_PASSWORD="<password>"

git push -f heroku master

heroku ps:scale worker=1

heroku addons:open scheduler:standard
# trigger refresh manually or to configure the scheduler
heroku run python pastamaker/refresher.py

Dashboard

Pastamaker offers a dashboard that you can access using a Web browser. Just point to the URL where your WSGI service runs.

dashboard.jpg

Github Projects Branch protections setuped by pastamaker

{
    'required_pull_request_reviews': {
        "dismiss_stale_reviews": True,
        "require_core_owner_reviews": True,
    },
    'required_status_checks': {
        'strict': True,
        'contexts': ['continuous-integration/travis-ci'],
    },
    'enforce_admins': {
        "enabled": True
    }
}