Sync master branch on PUSH_REPO

This commit is contained in:
Jannik Vogel 2016-11-25 20:04:54 +01:00
parent e0be423747
commit 68e1164e63
2 changed files with 6 additions and 1 deletions

View File

@ -12,7 +12,8 @@ Pull requests to fix issues with the bot are more than welcome.
## What does it do?
After doing the self-update, the bot will visit each of the listed `PULL_REPOS`.
After doing the self-update, the bot will clone the latest `MAIN_REPO` and resync `PUSH_REPO`/master.
After that, each of the `PULL_REPOS` is visited.
It will look for PRs on GitHub labelled with `LABEL_TO_FETCH` and merge those onto the `MAIN_REPO`/master branch.
If a PR fails to merge it will be ignored.
Once everything has been merged the bot will push the resulting files to the `PUSH_REPO`/`self.branch_name` branch.

View File

@ -154,6 +154,9 @@ class TagMergeBot:
return total_failed
def sync(self):
_git("push", "-f", self.push_repo["name"], "master", cwd=self.tracking_path)
def push(self):
_git("push", "-f", self.push_repo["name"], self.branch_name, cwd=self.tracking_path)
@ -212,6 +215,7 @@ if __name__ == "__main__":
# TODO: Rework this whole workflow to be sane.
# m = MergeBot(PULL_REPOS, PUSH_REPO)
t.reclone()
t.sync()
t.pull_branches()
failed = t.merge()
logger.info("Number of failed merges: {failed}".format(failed=failed))