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

upload: Query head oid of a PR via commits #206

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

jerry-skydio
Copy link
Collaborator

@jerry-skydio jerry-skydio commented Dec 30, 2024

The headRefOid field of a PR actually contains the oid of
whatever the tot of that branch name is, which may not be the
commit that is actually associated with the pr if it has been merged.
To get that correct, we have to query the actual commit list.

This handles a corner case in reordering PRs with the repo's merge
setting as rebase. Somehow this causes one of the reordered PRs to
get merged with 0 commmits, which later causes us to not re-make prs.

With this change, we'll always succeed in remaking prs if they are
erroneously closed or merged on a reorder. Avoiding having them get
closed is a follow-up change.

Topic: query1
Reviewers: aaron, brian-k

@jerry-skydio
Copy link
Collaborator Author

Reviews in this chain:
#206 upload: Query head oid of a PR via commits

@jerry-skydio
Copy link
Collaborator Author

jerry-skydio commented Dec 30, 2024

# head base diff date summary
0 f1278934 c7b92e83 diff Dec 30 0:28 AM 2 files changed, 37 insertions(+), 14 deletions(-)
1 935eac18 159f964c diff Dec 30 15:10 PM 1 file changed, 1 insertion(+)
2 e3cf33ed 159f964c diff Dec 30 15:12 PM 0 files changed
3 6ceee4e5 159f964c diff Dec 30 15:40 PM 1 file changed, 1 deletion(-)
4 c5af2774 0d7e5d3a rebase Jan 2 13:54 PM 0 files changed
5 65c5638d 0d7e5d3a diff Jan 2 14:05 PM 1 file changed, 1 insertion(+), 1 deletion(-)

@jerry-skydio jerry-skydio force-pushed the jerry/revup/main/query1 branch 2 times, most recently from 935eac1 to e3cf33e Compare December 30, 2024 20:12
@jerry-skydio jerry-skydio force-pushed the jerry/revup/main/query1 branch from e3cf33e to 6ceee4e Compare December 30, 2024 20:40
The headRefOid field of a PR actually contains the oid of
whatever the tot of that branch name is, which may not be the
commit that is actually associated with the pr if it has been merged.
To get that correct, we have to query the actual commit list.

This handles a corner case in reordering PRs with the repo's merge
setting as rebase. Somehow this causes one of the reordered PRs to
get merged with 0 commmits, which later causes us to not re-make prs.

With this change, we'll always succeed in remaking prs if they are
erroneously closed or merged on a reorder. Avoiding having them get
closed is a follow-up change.

Topic: query1
Reviewers: aaron, brian-k
@jerry-skydio jerry-skydio force-pushed the jerry/revup/main/query1 branch 2 times, most recently from c5af277 to 65c5638 Compare January 2, 2025 19:05
@jerry-skydio jerry-skydio merged commit 4933e4f into main Jan 2, 2025
5 checks passed
@jerry-skydio jerry-skydio deleted the jerry/revup/main/query1 branch January 2, 2025 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant