diff --git a/README.md b/README.md index 364d591..5d9e5c9 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/tag_build.py b/tag_build.py index c8df42b..0554bc4 100644 --- a/tag_build.py +++ b/tag_build.py @@ -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))