Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add delay before querying base ref #197

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions homu/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -912,6 +912,11 @@ def branch_equal_to_merge(git_cmd, state, branch):

def create_merge(state, repo_cfg, branch, logger, git_cfg,
ensure_merge_equal=False):
# Add some delay to try to make sure the base repo fetch is accurate.
# It seems like in some cases we're getting the previous commit from GH,
# e.g., https://github.com/rust-lang/homu/issues/75#issuecomment-1729058969
# Hopefully a delay helps.
time.sleep(60)
base_sha = state.get_repo().ref('heads/' + state.base_ref).object.sha

state.refresh()
Expand Down
Loading