Skip to content
forked from nbio/autopull

Create GitHub pull requests automatically.

Notifications You must be signed in to change notification settings

weppos/autopull

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 

Repository files navigation

autopull

Bash script that auto-creates Pull Requests for a given repo.

How it works

  1. Clones the to-be-updated repo (AP_REPO) into a tmp dir
  2. Does stuff (AP_CMD)
  3. Creates a PR for the changes
  4. Profit!

Configuration

This script uses environment variables for configuration; most must be set. Examples are from the ZoneDB project, which updates its data daily.

  • AP_REPO — GitHub repository to auto-update, in the form of user/repo, e.g. zonedb/zonedb
  • AP_BRANCH — Branch to check out. Default: master
  • AP_SETUP_CMD — Optional command to run before running the update command, e.g. for installing dependencies.
  • AP_CMD — Update command that mutates the repository. Default: make update
  • GH_USER — GitHub username (yours or a bot)
  • GH_TOKEN – GitHub access token (not your password!)
  • GIT_AUTHOR_NAME and GIT_COMMITTER_NAME — Name of the user or robot doing the committing. Both must be set.
  • GIT_AUTHOR_EMAIL and GIT_COMMITTER_EMAIL — Email address of the user or robot doing the committing. Both must be set.

Heroku quickstart

  1. Clone (or fork) this repository
  2. Create a Heroku app, which will run the autopull script
  3. Set the above environment variables
  4. Add the Heroku Scheduler add-on: heroku addons:create scheduler:standard
  5. Configure the work schedule: heroku addons:open scheduler and command to run (./autopull)
  6. Push your fork to Heroku: git push {your Heroku app's git remote}
  7. Test: heroku run ./autopull -a {your Heroku app name}

Deploy

Python example

  • AP_CMDpython3 script.py
  • AP_SETUP_CMDpip3 install -r requirements.txt

Credits

© 2015 nb.io, LLC

About

Create GitHub pull requests automatically.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%