Sync master branch on PUSH_REPO
This commit is contained in:
parent
e0be423747
commit
68e1164e63
@ -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.
|
||||
|
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user