Skip to content

Commit

Permalink
Code cosmetics
Browse files Browse the repository at this point in the history
  • Loading branch information
sbidoul committed Sep 16, 2023
1 parent e3e3e4d commit a3397e6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/oca_github_bot/tasks/merge_bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -172,19 +172,26 @@ def _merge_bot_merge_pr(org, repo, merge_bot_branch, cwd, dry_run=False):
# (without .dev suffix).
bump_manifest_version(addon_dir, bumpversion_mode, git_commit=True)
build_and_check_wheel(addon_dir)

if dry_run:
_logger.info(f"DRY-RUN git push in {org}/{repo}@{target_branch}")
else:
_logger.info(f"git push in {org}/{repo}@{target_branch}")
check_call(
["git", "push", "origin", f"{merge_bot_branch}:{target_branch}"], cwd=cwd
)

# build and publish wheel
if modified_installable_addon_dirs:
for addon_dir in modified_installable_addon_dirs:
build_and_publish_wheel(addon_dir, dist_publisher, dry_run)

# TODO wlc unlock modified_addons

# delete merge bot branch
_git_delete_branch("origin", merge_bot_branch, cwd=cwd)

# notify sucessful merge in PR comments and labels
with github.login() as gh:
gh_pr = gh.pull_request(org, repo, pr)
gh_repo = gh.repository(org, repo)
Expand Down

0 comments on commit a3397e6

Please sign in to comment.