mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Updated Bot commands (markdown)
@ -12,25 +12,31 @@ By default, the Lint and pull workflows should run on every push to your pull re
|
||||
## Merging through GH1 (Beta)
|
||||
We are in the process of prototyping our GitHub First initiative, which will allow certain pull requests based on the upstream repo (not a fork) to be merged through GitHub first, then imported internally into Meta. The requirements for such PRs are described in [our merge rules](https://github.com/pytorch/pytorch/blob/master/.github/merge_rules.json) where files fitting the specified patterns approved by the specified maintainers are allowed to merge directly with the following comment:
|
||||
|
||||
# Merging
|
||||
Merging is simple. You can simply use the following command.
|
||||
```
|
||||
# For normal merging
|
||||
@pytorchbot merge this
|
||||
|
||||
# BETA to become the default -- merge once the required status checks (e.g., Lint) are green.
|
||||
# This command is currently being tested and "merge this" will have "on green" behavior once it is verified to work as expected.
|
||||
# Help test out this command whenever!
|
||||
@pytorchbot merge this on green
|
||||
|
||||
# If we need to force merge to unblock a critical path or fix a critical error. **USE WITH ABUNDANT DISCRETION (OR NEVER)!**
|
||||
@pytorchbot force merge this
|
||||
@pytorchbot merge
|
||||
```
|
||||
|
||||
We also have the following flags:
|
||||
|
||||
-f, -force: force merge the PR, bypassing all the required status checks.
|
||||
|
||||
-g, -green, -onGreen: merge the PR only when all the required status checks have passed (BETA).
|
||||
|
||||
Examples:
|
||||
```
|
||||
@pytorchbot merge -f
|
||||
@pytorchbot merge -g
|
||||
```
|
||||
## Reverting
|
||||
Similar to merging, we have a command to revert a PR, though it requires you be a Meta employee at the moment. You can always submit a PR to back out a change and merge with the commands above.
|
||||
Similar to merging, we have a command to revert a PR, though it requires you be a Meta employee at the moment. You can always submit a PR to back out a change and merge with the commands above. Revert requires you to provide both a message and classification for record keeping purposes.
|
||||
|
||||
```
|
||||
@pytorch bot revert this <Revert Reason Greater than 3 words>
|
||||
@pytorch bot revert -m="" -c=""
|
||||
```
|
||||
-m, -message: The reason why you are reverting this PR. Must be at least 3 words.
|
||||
-c, -classification: What type of revert this is. Potential classifications are: nosignal, ignoredsignal, landrace, weird, ghfirst.
|
||||
|
||||
## Labeling
|
||||
You can also add multiple labels using comments with pytorchbot.
|
||||
@ -43,7 +49,7 @@ You can also add multiple labels using comments with pytorchbot.
|
||||
Rebasing is useful you're reviewing an older PR and want to get new signal: you might want to rebase to get the most up to date tests and re run the CI. Note that rebasing always defaults to the default branch of pytorch/pytorch, which currently is master. You can rebase your own PR anytime, but currently, only a select few organization members can rebase others' PRs.
|
||||
|
||||
```
|
||||
@pytorchbot rebase this
|
||||
@pytorchbot rebase
|
||||
```
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user