zengk95
2acd2317b8
[mergebot] Create land time check options ( #77943 )
...
This adds land time checks before we try to merge. What this does is:
1. Merge changes into latest master, check out a new branch, push, and have a workflow that runs jobs from trunk (and maybe pull)
2. Wait for all checks in the landtime workflow to finish by using the GH API (graphql doesn't have this method from what I can see)
3. push the changes in
Test Plan:
Tested this in canary with a new workflow that passes and lint, tested what happens if i break the new workflow by exiting with 1, the normal flow, and some other flows.
Tested it breaking when land checks fail:
https://github.com/pytorch/pytorch-canary/pull/113#issuecomment-1165941716
Test that it works:
https://github.com/pytorch/pytorch-canary/pull/114#issuecomment-1165922791
Test that normal validations like PR is broken:
https://github.com/pytorch/pytorch-canary/pull/113#issuecomment-1165930037
Test that normal merge works:
https://github.com/pytorch/pytorch-canary/pull/113#issuecomment-1166751288
Test that force merge works:
https://github.com/pytorch/pytorch-canary/pull/113#issuecomment-1167507356
Pull Request resolved: https://github.com/pytorch/pytorch/pull/77943
Approved by: https://github.com/janeyx99
2022-06-27 22:28:12 +00:00
zengk95
0a06bf89db
fix up trymerge ( #80100 )
...
Addresses #80096
In the Github API, they don't set the parent conclusion to FAILURE if one of the jobs has a failure. It's stuck at null until all jobs finish, which isn't good for TTS on mergebot.
Example GH response:
<img width="827" alt="image" src="https://user-images.githubusercontent.com/34172846/175170084-de6bb419-925e-41a6-8c12-6732b35b6cab.png ">
<img width="1264" alt="image" src="https://user-images.githubusercontent.com/34172846/175170180-c629ed4d-a174-4179-8321-1a192d1ec8f3.png ">
In here, we check if there's a failing check within the checkruns and if it is, it'll set the workflow run conclusion to failure
Test Plan:
Run the find_matching_merge_rule method and check that it throws a RunTimeError for pull on a certain PR
<img width="1172" alt="image" src="https://user-images.githubusercontent.com/34172846/175170413-a28352c6-f518-4aa2-a068-d13df9f76268.png ">
Pull Request resolved: https://github.com/pytorch/pytorch/pull/80100
Approved by: https://github.com/janeyx99 , https://github.com/seemethere
2022-06-23 16:59:07 +00:00
Nikita Shulga
e282f5fe97
[GHF] Update commit body generation for GHF PRs ( #80105 )
...
Use the same logic regular PR (i.e. extract commit title and body from
PR description rather than from original commit)
According to @ezyang this is how it's supposed to be
Tested in https://github.com/malfet/deleteme/pull/27
Pull Request resolved: https://github.com/pytorch/pytorch/pull/80105
Approved by: https://github.com/janeyx99
2022-06-23 15:20:02 +00:00
Nikita Shulga
964eb47881
[GHF] Do not notify on merges ( #80064 )
...
When PR changes state from open to close this is a notification enough of the successful action triggered by the bot
Fixes #80062
Pull Request resolved: https://github.com/pytorch/pytorch/pull/80064
Approved by: https://github.com/kit1980 , https://github.com/seemethere , https://github.com/janeyx99
2022-06-22 20:35:52 +00:00
Nikita Shulga
50ce30520b
[GHF][BE] Comment on reverted commit ( #79913 )
...
Makes it easier to see which version of PR were reverted when same PR is
reopened to re-land the change
Re-factor `gh_post_comment` into local `_gh_post_comment` that takes URL
and comment body and add two implementations: `gh_post_pr_comment` and
`gh_post_commit_comment`
Use later in revert bot after `Reverted` label is added to PR
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79913
Approved by: https://github.com/atalman
2022-06-22 02:46:48 +00:00
PyTorch MergeBot
bd7cd7c356
Revert "[GHF][BE] Comment on reverted commit ( #79913 )"
...
This reverts commit 4843b58f4b .
Reverted https://github.com/pytorch/pytorch/pull/79913 on behalf of https://github.com/malfet due to Breaks lint
2022-06-22 02:28:13 +00:00
Nikita Shulga
4843b58f4b
[GHF][BE] Comment on reverted commit ( #79913 )
...
Makes it easier to see which version of PR were reverted when same PR is
reopened to re-land the change
Re-factor `gh_post_comment` into local `_gh_post_comment` that takes URL
and comment body and add two implementations: `gh_post_pr_comment` and
`gh_post_commit_comment`
Use later in revert bot after `Reverted` label is added to PR
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79913
Approved by: https://github.com/atalman
2022-06-22 01:23:12 +00:00
zengk95
b58afc926d
[mergebot] post comment on finishing ( #79448 )
...
This makes the bot comment to ping the user whenever the merge or revert finishes completing. Also does a bit of refactoring.
Addreses https://github.com/pytorch/test-infra/issues/392
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79448
Approved by: https://github.com/seemethere
2022-06-21 17:43:03 +00:00
clee2000
5b44ba834f
add check for ci sev ( #79745 )
...
block merge when theres an open issue with ci sev label + "merge blocking" in the body
tested on https://github.com/pytorch/pytorch-canary/pull/108
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79745
Approved by: https://github.com/seemethere
2022-06-20 18:36:19 +00:00
Catherine Lee
584e21bf7b
automate hash updates - add new lint to appease lint ( #79832 )
...
as in title, lint dislikes the lack of a new line at the end of the file
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79832
Approved by: https://github.com/seemethere
2022-06-20 15:56:38 +00:00
swang392
e2a2ecac0e
finalized GHA for promoting to viable/strict ( #79649 )
...
Relates to #76700
**Overview:** Finalized GHA to push commits to viable/strict. Added `git push` statement to GHA that updates the viable/strict branch, modified checkout repo step.
**Test Plan:** Tested on `pytorch/pytorch-canary` [here.](https://github.com/pytorch/pytorch-canary/runs/6922229055?check_suite_focus=true ) Need to edit branch protection rules in https://fburl.com/code/w3tiegy6
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79649
Approved by: https://github.com/seemethere
2022-06-20 12:53:39 +00:00
Catherine Lee
514bf9fecb
automate hash pinning ( #79470 )
...
automate the pr approval and merging of hash pinning
also switch to a python script for easier control flow
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79470
Approved by: https://github.com/seemethere
2022-06-17 18:22:15 +00:00
Nikita Shulga
ac89ff56ce
[BE] Test trymerge against hardcoded set of rules ( #79764 )
...
Otherwise we'd often get into chicken-and-egg problem and have to modify
test to satisfy new changes in merge rules
Add new test to validate that merge_rules are valid
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79764
Approved by: https://github.com/kit1980
2022-06-17 02:17:14 +00:00
Nikita Shulga
4661c75f0d
[BE][TryMerge] Do not re-import trymerge multiple times ( #79760 )
...
Just import `main` as `trymerge_main` in first import statement
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79760
Approved by: https://github.com/kit1980
2022-06-17 00:49:56 +00:00
Jon Janzen
920ac70e8a
[pytorch][gh1] Fix failing test ( #79632 )
...
Summary: See tasks, these tests are broken in fbsource
Test Plan: `buck test fbcode//caffe2/.github/scripts:`
Differential Revision: D37182246
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79632
Approved by: https://github.com/malfet , https://github.com/seemethere
2022-06-16 17:48:13 +00:00
PyTorch MergeBot
44e5593b17
Revert "automate hash pinning ( #79470 )"
...
This reverts commit 8f8a661ddc .
Reverted https://github.com/pytorch/pytorch/pull/79470 on behalf of https://github.com/zengk95 due to typo in workflow
2022-06-16 01:19:20 +00:00
swang392
26e1afe9f2
Made improvements to isGreen ( #79619 )
...
Relates to #76700
**Overview**: Made regex a local variable in the `isGreen` method and improved debugging message for missing relevant workflows. If there are required workflows missing, the message will now print which workflows were not found.
**Test Plan**: Updated relevant test case in `test_print_latest_commits.py`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79619
Approved by: https://github.com/janeyx99
2022-06-15 20:44:28 +00:00
Catherine Lee
8f8a661ddc
automate hash pinning ( #79470 )
...
automate the pr approval and merging of hash pinning
also switch to a python script for easier control flow
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79470
Approved by: https://github.com/seemethere
2022-06-15 20:20:58 +00:00
swang392
6015987dc3
Added edge case checking in isGreen ( #79565 )
...
Relates to #76700
**Overview**: One edge case not accounted for in the original logic of `isGreen` was for commits with no workflow checks. Similarly, if any of the required checks are not present (ex: if all of the pull checks are skipped), the workflow should not be promoteble. A commit should only be promoteable if there is it least one workflow check from each required group present (i.e. none of them are skipped)
**Test Plan:** Verify that commits on the HUD with no workflow checks are not considered promote-able. Added a test case with no workflows in `test_print_latest_commits.py`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79565
Approved by: https://github.com/seemethere
2022-06-15 15:49:16 +00:00
Nirav Mehta
e81ab046bd
Skip stale check when facebook-github-bot is merging ( #79572 )
...
# Summary
ShipIt jobs triggered by co-development workflows are failing to merge PRs due to stale checks. This diff skips the stale check when merge is triggered by `facebook-github-bot`.
Sample merge failure: https://github.com/pytorch/pytorch/pull/78654#issuecomment-1155607617
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79572
Approved by: https://github.com/bigfootjon , https://github.com/seemethere , https://github.com/malfet
2022-06-15 03:24:51 +00:00
zengk95
bfb46ebb66
[mergebot] Add return on force ( #79450 )
...
See title
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79450
Approved by: https://github.com/clee2000 , https://github.com/janeyx99
2022-06-13 20:36:12 +00:00
zengk95
c727ec6129
[mergebot] add additional checks ( #79317 )
...
We're adding 2 additional checks:
1. If the user has pushed any additional updates to a PR while we're busy waiting.
2. If the user's PR is greater than 3 days old (I think this is the limit on phabricator is the same) we don't let them merge (unless force pushing). Maybe this can be extended to 5 or 7 day if we get a lot of negative feedback.
Check that the script still runs with these additional checks using dry run
<img width="763" alt="image" src="https://user-images.githubusercontent.com/34172846/173151477-40fd1779-fc8b-4d92-b393-2e2fcc456259.png ">
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79317
Approved by: https://github.com/seemethere
2022-06-13 19:28:29 +00:00
swang392
71b00a049a
Refactored print_latest_commits.py to return the latest viable commit from master ( #79422 )
...
Relates to #76700
**Overview:** Originally `print_latest_commits.py` returned a list of commit SHAs on master from the last M minutes, outputted the individual workflow results, and also displayed if a given commit was promoteable to the viable/strict branch. I realized using this time-based method of retrieving SHAs wasn't the most effective since it takes ~4 hours for all of the HUD tests to run. Since this script will be used to find the latest green commits to promote to viable/strict, I refactored the code to instead collect all of the SHAs that differ between master and viable/strict and output most recent stable commit.
**Example Output:** This script just prints out the latest viable commit on master. If no new commits on master are promote-able, the script outputs the latest commit on viable/strict.

**Test Plan:** While implementing the code, I compared the output of the `get_latest_commits` method with the HUD to make sure it matched. I also ensured that the results from `isGreen` matched those on the HUD and cross checked the final output with the HUD.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79422
Approved by: https://github.com/janeyx99 , https://github.com/seemethere
2022-06-13 18:30:38 +00:00
swang392
6bea742c10
Revised test cases for isGreen ( #79223 )
...
Relates to #76700
**Overview:** Revised and added new test cases to `test_print_latest_commits.py` to test the functionality of `isGreen`. All tests are successful!
**Test Plan:** Check that everything is passing
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79223
Approved by: https://github.com/janeyx99
2022-06-10 17:46:43 +00:00
zengk95
ebc936d608
[mergebot] Default on green ( #79242 )
...
Another attempt at landing this
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79242
Approved by: https://github.com/janeyx99
2022-06-10 14:26:31 +00:00
Nikita Shulga
01929b7374
Delete syncbranches script/workflow ( #79245 )
...
As majority of the changes are going thru @pytorchmergebot and
there is a good enough tooling for making sure that code-development
changes are merged as well
https://github.com/pytorch/pytorch/tree/fbsync branch will still stay in
place can be use to verify if something is amiss
Fixes #ISSUE_NUMBER
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79245
Approved by: https://github.com/seemethere
2022-06-09 23:37:26 +00:00
PyTorch MergeBot
39bfdf4175
Revert "[mergebot] Make merge on green default behavior ( #79199 )"
...
This reverts commit ddeeca0bb5 .
Reverted https://github.com/pytorch/pytorch/pull/79199 on behalf of https://github.com/zengk95 due to messed up on-mandatory which is a functional issue
2022-06-09 21:58:12 +00:00
zengk95
ddeeca0bb5
[mergebot] Make merge on green default behavior ( #79199 )
...
This makes the merge on green behavior default as we tried to do it earlier, but forgot to pass in the force arguments.
This also adds a few tests so that we don't make that mistake again (although people can still forget to pass in the arguments through shell).
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79199
Approved by: https://github.com/janeyx99 , https://github.com/seemethere , https://github.com/malfet
2022-06-09 21:07:02 +00:00
swang392
397f222457
implemented isGreen functionality to verify whether a commit SHA is promote-able ( #79061 )
...
Relates to #76700
**Overview:** I implemented the isGreen method in `print_latest_commits.py` which takes in a commit SHA and returns if the commit is promote-able to viable/strict. I use a regex for checks that must be successful, and a short allow-list for the checks that can either be success or skipped. If a commit SHA is not promote-able, the method will output a short error message specifying which workflow name (ex: pull, android-tests) that had unpromote-able check results.
**Example Outputs:**
Example of a promote-able SHA:


This matches the current viable/strict branch as this SHA is part of viable/strict on the HUD.
Example of an unpromote-able SHA:


**Test Plan:** Compare commit SHAs with those found on the viable/strict branch on the HUD. I have also looked manually at the check results for commits on the HUD in the master branch to see if they are green and promoteable to viable/strict. Since I did not use the original specifications for green-ness that were mentioned in #76700 , I will modify my test cases in the next PR.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79061
Approved by: https://github.com/seemethere
2022-06-09 18:32:07 +00:00
Nikita Shulga
db08eb88e6
[GHF] Make wait-on-green abort on FAILED checks ( #79209 )
...
Hattip to @janeyx99 and @zengk95 for pointing this one out
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79209
Approved by: https://github.com/seemethere
2022-06-09 18:08:11 +00:00
Nikita Shulga
a374254b68
[GHF] Make -g wait for all ( #79196 )
...
Introduce `pr_has_pending_checks` and `get_pending_checks` functions,
increase wait time between checks to 5 min to reduce GH token
utilization
TODO: Need to propagate "on-mandatory" via bot, but IMO it's low priority
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79196
Approved by: https://github.com/janeyx99
2022-06-09 15:41:33 +00:00
Nikita Shulga
530ee1c383
[GHF] Workaround GH GQL limitation ( #79090 )
...
One can not use pagination to fetch more than 250 commits on PR
Pull Request resolved: https://github.com/pytorch/pytorch/pull/79090
Approved by: https://github.com/osalpekar
2022-06-08 02:42:21 +00:00
swang392
7a23dd343e
Wrote stubbed out test cases for isGreen function to verify if a commit SHA is promote-able ( #78932 )
...
Relates to #76700
**Overview:** Created a test script (`test_print_latest_commits.py`) and wrote stub tests for the future`isGreen` function. I also made a `WorkflowCheck` object to keep track of workflow conclusions in `print_latest_commits.py` which will be useful for implementing`isGreen`.
**Test Plan:** Since `isGreen` has not been implemented yet, only the `test_match_rules` case passes and all others fail. Depending on how we plan to implement isGreen (either using the specifications from #76700 or looking at specific groups of checks in more detail), I will need to make additional test cases.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78932
Approved by: https://github.com/seemethere
2022-06-07 17:33:15 +00:00
PyTorch MergeBot
d06bdaac50
Revert "Wrote stubbed out test cases for isGreen function to verify if a commit SHA is promote-able ( #78932 )"
...
This reverts commit fc3a5d8117 .
Reverted https://github.com/pytorch/pytorch/pull/78932 on behalf of https://github.com/janeyx99 due to Broke ROCm tests when introducing rockset requirement https://hud.pytorch.org/minihud#fc3a5d81171ba465e3d62ffbda9713b53039b5f0
2022-06-07 04:14:07 +00:00
swang392
fc3a5d8117
Wrote stubbed out test cases for isGreen function to verify if a commit SHA is promote-able ( #78932 )
...
Relates to #76700
**Overview:** Created a test script (`test_print_latest_commits.py`) and wrote stub tests for the future`isGreen` function. I also made a `WorkflowCheck` object to keep track of workflow conclusions in `print_latest_commits.py` which will be useful for implementing`isGreen`.
**Test Plan:** Since `isGreen` has not been implemented yet, only the `test_match_rules` case passes and all others fail. Depending on how we plan to implement isGreen (either using the specifications from #76700 or looking at specific groups of checks in more detail), I will need to make additional test cases.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78932
Approved by: https://github.com/seemethere
2022-06-06 23:01:55 +00:00
Eli Uriegas
a886bd387c
ci: Add clickable debug messages for trymerge
...
Signed-off-by: Eli Uriegas <eliuriegasfb.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78941
Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
Approved by: https://github.com/janeyx99
2022-06-06 17:51:18 +00:00
PyTorch MergeBot
f2b56dd6ee
Revert "Default on green ( #78811 )"
...
This reverts commit c5a0d8dccc .
Reverted https://github.com/pytorch/pytorch/pull/78811 on behalf of https://github.com/zengk95 due to This does not have force in there
2022-06-06 17:27:54 +00:00
Xu Zhao
7d0bbb853e
Add userbenchmark support to TorchBench CI ( #78794 )
...
Support userbenchmarks, such as nvfuser, in the TorchBench CI.
Test Plan: TorchBench CI
RUN_TORCHBENCH: nvfuser
TORCHBENCH_BRANCH: xz9/fix-ubs
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78794
Approved by: https://github.com/malfet
2022-06-03 21:07:36 +00:00
zengk95
b6378103c0
Add comment link for Job Run URL ( #78823 )
...
This adds a comment to link to the job run url whenever the job starts. As discussed here https://github.com/pytorch/test-infra/issues/360
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78823
Approved by: https://github.com/suo , https://github.com/seemethere
2022-06-03 20:31:19 +00:00
Catherine Lee
bb20296190
rebase via comment - better ghstack comment ( #78833 )
...
Fixes https://github.com/pytorch/pytorch/issues/78830
i have no idea how ghstack works, so ill take your word for it
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78833
Approved by: https://github.com/suo , https://github.com/seemethere
2022-06-03 20:04:03 +00:00
zengk95
c5a0d8dccc
Default on green ( #78811 )
...
Reopens https://github.com/pytorch/pytorch/pull/78771
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78811
Approved by: https://github.com/janeyx99
2022-06-03 18:04:31 +00:00
Catherine Lee
86c42d63c8
rebase via comment - rebase to any branch ( #78772 )
...
pr in test infra: https://github.com/pytorch/test-infra/pull/366
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78772
Approved by: https://github.com/suo , https://github.com/janeyx99
2022-06-03 17:13:11 +00:00
swang392
88f4a12402
using new rockset commit_jobs_batch_query to print check statuses ( #78750 )
...
Relates to #76700
**Overview:** Made a new Rockset Query Lambda called `commit_jobs_batch_query` that takes in a string composed of multiple SHAs separated with commas. Only one query execution is necessary to get all of the workflow job conclusions for all SHAs, which saves time.
**Example output:**

**Test Plan**: Compare output with HUD and verify that workflow conclusions are correct
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78750
Approved by: https://github.com/seemethere
2022-06-02 21:42:38 +00:00
swang392
7fc73285da
Added a function that prints the check statuses run on a given commit SHA ( #78663 )
...
Relates to #76700
Gets the commit SHAs from the past M minutes, and prints out the SHAs along with the status checks for all of the jobs for each commit. The current output prints out each SHA and a list of all of the workflow job conclusions.
Example output:

**Test Plan:** compare output with HUD
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78663
Approved by: https://github.com/seemethere
2022-06-02 15:05:14 +00:00
Catherine Lee
a171ea6b47
rebase bot - add ghstack config ( #78561 )
...
Fixes #78539
testing pr: https://github.com/clee2000/random-testing/pull/14
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78561
Approved by: https://github.com/janeyx99 , https://github.com/seemethere
2022-05-31 23:37:37 +00:00
swang392
f12ef908a8
added stub script that prints out latest commits ( #78397 )
...
Fixes #76700
Prints out a list of commit SHAs from the last M minutes. Takes in a command line argument for the minutes, otherwise defaults to 60 mins.
**Test Plan**: compare output with the SHAs from the HUD and see if they are correct. Some SHAS printed with the script are not included on the HUD, but all of the commits on the HUD are outputted correctly.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78397
Approved by: https://github.com/seemethere
2022-05-31 19:12:37 +00:00
Nikita Shulga
d2d1d78f81
[GHF] Add spaces between words in merge fail reasons ( #78378 )
...
I.e. reviewers name should be comma+space separator as well as failed job named should be space separate from colon before that
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78378
Approved by: https://github.com/suo , https://github.com/atalman , https://github.com/janeyx99
2022-05-26 20:05:26 +00:00
swang392
dde56ca329
fixing invalid upstream for rebase to viable/strict ( #78371 )
...
Testing rebase functionality [#78360 ](https://github.com/pytorch/pytorch/pull/78360 ) failed due to `invalid upstream 'viable/strict'`. Fixing by changing branch string to "refs/remotes/origin/viable/strict"
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78371
Approved by: https://github.com/janeyx99
2022-05-26 17:43:39 +00:00
Michael Suo
d98a8148b6
[ci] remove ciflow/all ( #78317 )
...
The counterpart to https://github.com/pytorch/test-infra/pull/353 , see
that PR for more context.
[skip ci]
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78317
Approved by: https://github.com/janeyx99
2022-05-26 16:25:25 +00:00
swang392
bbb2964bd8
Add functionality for rebasebot to rebase onto viable/strict branch ( #78276 )
...
Fixes #325
**Summary**: Currently, the pytorchbot only allows for rebasing to the master branch. These modifications add functionality for rebasing to the 'viable/strict' branch of pytorch/pytorch by adding a flag to the comment.
**Test Plan:** tested manually on personal fork ([#1 ](https://github.com/swang392/pytorch/pull/1 )), and included a test case in test_tryrebase.py that checks if rebasing to viable/strict branch was successful.
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78276
Approved by: https://github.com/clee2000 , https://github.com/janeyx99
2022-05-25 21:02:39 +00:00