Skip to content

Instantly share code, notes, and snippets.

@27thLiz
Created February 3, 2018 11:16
Show Gist options
  • Save 27thLiz/9b3d6c4bc4cd0da514e04767b8a2b425 to your computer and use it in GitHub Desktop.
Save 27thLiz/9b3d6c4bc4cd0da514e04767b8a2b425 to your computer and use it in GitHub Desktop.
from github import Github
import os
#use authentication so we don't get rate-limited
g = Github(login_or_token="username", password="password")
repo = g.get_repo("godotengine/godot")
cherrypick_label = repo.get_label("cherrypick")
issues = repo.get_issues(state="closed", labels=[cherrypick_label])
for issue in issues:
pr = repo.get_pull(issue.number)
for commit in pr.get_commits():
print(os.system("git cherry-pick " + commit.sha))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment