-
Notifications
You must be signed in to change notification settings - Fork 2
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
Two #74
base: gh/malfet/23/base
Are you sure you want to change the base?
Two #74
Conversation
This PR needs a
|
@pytorchbot revert -m "Two makes a pair" -c weird |
@pytorchbot successfully started a revert job. Check the current status here. |
@malfet your PR has been successfully reverted. |
This reverts commit 8b11840. Reverted #75 on behalf of https://github.com/malfet due to Two makes a pair ([comment](#74 (comment)))
This reverts commit af99e57. Reverted #74 on behalf of https://github.com/malfet due to Two makes a pair ([comment](#74 (comment)))
By adding `get_ghstack_dependent_prs` that using `git branch --contains` finds all PRs containing stacked branch, selecting longest one (in terms of distance between origin and default branch) and skipping all open PRs Please note, that reverts should be applied in a reversed order with the one how PRs were landed originally. Use a bit of a defensive programming, i.e. revert single PR if attempt to fetch dependencies fails for some reason. Test plan: - Lint - ``` >>> from trymerge import GitRepo, GitHubPR, get_ghstack_prs, get_ghstack_dependent_prs >>> pr=GitHubPR("pytorch", "pytorch", 115188) >>> pr1=GitHubPR("pytorch", "pytorch", 115210) >>> repo=GitRepo("/Users/nshulga/git/pytorch/pytorch") >>> get_ghstack_dependent_prs(repo, pr1) [('22742d93a5357c9b5b45a74f91a6dc5599c9c266', <trymerge.GitHubPR object at 0x100f32f40>)] >>> get_ghstack_dependent_prs(repo, pr) [('22742d93a5357c9b5b45a74f91a6dc5599c9c266', <trymerge.GitHubPR object at 0x10102eaf0>), ('76b1d44d576c20be79295810904c589241ca1bd2', <trymerge.GitHubPR object at 0x10102eb50>)] >>> rc=get_ghstack_dependent_prs(repo, pr) rc[0]>>> rc[0][1].pr_num 115210 >>> rc[1][1].pr_num 115188 ``` - see: malfet/deleteme#59 (comment) and malfet/deleteme#74 (comment) Fixes pytorch/test-infra#4845 Pull Request resolved: #116447 Approved by: https://github.com/huydhn ghstack dependencies: #116446
Stack from ghstack (oldest at bottom):