-
Notifications
You must be signed in to change notification settings - Fork 78
Open
Description
Problem
We have the following situation:
-
We have some commits on the target branch:
LoadinggitGraph commit commit commit -
We create a codeflow PR that has a conflict, so it only creates the "initializer" empty commit, like so:
LoadinggitGraph commit commit id: "PR base commit" branch prBranch commit id: "Initial PR commit" checkout main commit -
Now no one tends to the PR and more commits merge into the target branch
LoadinggitGraph commit commit id: "PR base commit" branch prBranch commit id: "Initial PR commit" checkout main commit commit id: "new commit #1" commit id: "new commit #2" commit id: "new commit #3" -
Now if the service wants to flow new commits, the PR branch already exists and can't be rebased properly.
Goal
When no commits were flown yet, we should instead recreate the PR branch like it would be at the top of the main branch.
gitGraph
commit
commit
commit
commit id: "new commit #1"
commit id: "new commit #2"
commit id: "new commit #3"
branch prBranch
commit id: "Initial PR commit"
But, we can't do it during the flow because then the dev would need to force-push.
Instead, I think whenever the service flows new build, it should check if it actually made any commits so far and if not, it should rebase+force-push.
Metadata
Metadata
Assignees
Labels
No labels