av icon indicating copy to clipboard operation
av copied to clipboard

Make PRs to draft at the beginning of the sync operation instead of doing so one by one

Open draftcode opened this issue 1 year ago • 0 comments

When the repository is using CODEOWNERS, there's a race condition inside GitHub that sees diffs for the parent PR in the stack, and it'll assign reviewers for them. In order to avoid this, av-cli make a PR into draft and then undraft after the operation.

When doing this, we do this draft-undraft operation one PR each. Let's say we have PR1, PR2 in a stack in this order. In av stack sync, we make PR1 draft, push, undraft. When doing so, it seems that PR2's diff is temporarily based on the parent of PR1 because PR1 is being draft.

To fix this issue, we need to make all the PRs in the stack as draft first (or more strictly speaking, we need to make child PRs draft before syncing a PR).

draftcode avatar Mar 28 '24 17:03 draftcode