ZLint Autopull
Bash script that auto-creates Pull Requests for zlint's gtld data.
Forked from https://github.com/nbio/autopull and tailored to Go, zlint
and
Travis CI.
How it works
- Clones the to-be-updated repo (
AP_REPO
) into a tmp dir - Does stuff (
AP_CMD
) - Creates a PR for the changes
- Profit!
Configuration
This script uses environment variables for configuration; most must be set.
AP_REPO
— GitHub repository to auto-update, in the form ofuser/repo
, e.g.zmap/zlint
AP_BRANCH
— Branch to check out. Default:master
AP_CMD
— Update command that mutates the repository. Default:go generate ./...
GH_USER
— GitHub usernameGH_PASSWORD
— GitHub user password (for cloning the repo)GH_TOKEN
– GitHub access token (not your password!)GIT_AUTHOR_NAME
andGIT_COMMITTER_NAME
— Name of the user or robot doing the committing. Both must be set.GIT_AUTHOR_EMAIL
andGIT_COMMITTER_EMAIL
— Email address of the user or robot doing the committing. Both must be set.
Travis quickstart
- Clone (or fork) this repository
- Tweak
.travis.yml
if you need to install prereqs for theAP_CMD
- Add the
GH_USER
as a collaborator on yourAP_REPO
to push PR branches - Enable Travis CI for the repository
- Configure all of the required environment variables in the Travis UI (be sure
not to allow displaying the
GH_TOKEN
orGH_PASSWORD
env vars in the log) - Enable a daily cron build of master
Credits
Original © 2018 nb.io, LLC