Skip to content

Commit 61fb944

Browse files
committed
yet another attempt at avoiding merge conflict
1 parent 3561669 commit 61fb944

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

scripts/automated_ingestion/eessi_task.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -832,7 +832,7 @@ def _find_pr_for_branch(self, branch_name: str) -> Optional[PullRequest]:
832832
"""
833833
try:
834834
head_ref = f"{self.git_repo.owner.login}:{branch_name}"
835-
filter_prs = [16, 17, 18, 19, 20] # TODO: remove this once the PR is merged
835+
filter_prs = [16, 17, 18, 19, 20, 21] # TODO: remove this once the PR is merged
836836
prs = [pr for pr in list(self.git_repo.get_pulls(state='all', head=head_ref))
837837
if pr.number not in filter_prs]
838838
return prs[0] if prs else None
@@ -926,8 +926,13 @@ def _handle_add_payload_staged(self):
926926
# - next state in default branch (interpreted as current state)
927927
# - approved state in feature branch (interpreted as future state, ie, after the PR is merged)
928928
self._update_task_state_file(next_state, branch_name=default_branch_name)
929-
# sync task state file from default to feature branch (attempt to avoid merge conflicts)
930-
self._sync_task_state_file(default_branch_name, feature_branch_name)
929+
# merge default branch into feature branch (attempt to avoid merge conflicts)
930+
self.git_repo.merge(
931+
head=default_branch_name,
932+
base=feature_branch_name,
933+
commit_message=f"Merge {default_branch_name} into {feature_branch_name}"
934+
)
935+
# update task state file in feature branch
931936
self._update_task_state_file(approved_state, branch_name=feature_branch_name)
932937
log_message(LoggingScope.TASK_OPS, 'INFO',
933938
"TaskState file updated to %s in default branch (%s) and to %s in feature branch (%s)",

0 commit comments

Comments
 (0)