Last active
August 29, 2015 14:16
-
-
Save Sulverus/17dbe2665341031c94c3 to your computer and use it in GitHub Desktop.
Travis pusher
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Travis rebuild pusher | |
# requires: travispy | |
# Also you need to have github api token | |
from travispy import TravisPy | |
github_token = '[Your github token]' | |
def travis_auth(token): | |
return TravisPy.github_auth(token) | |
def travis_push(travis, repository): | |
user = travis.user() | |
repo = travis.repo(repository) | |
build = travis.build(repo.last_build_id) | |
return build.restart() | |
if __name__ == '__main__': | |
token = travis_auth(github_token) | |
for repo in ['me/myrepo1', 'me/myrepo2', 'me/myrepo3']: | |
print '[%s]: %s' % (repo, travis_push(token, repo)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment