mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Updated Bot commands (markdown)
@ -4,90 +4,69 @@ Updated on: Wed, Jun 1, 2022
|
|||||||
|
|
||||||
Please report any buggy instances to @pytorch/pytorch-dev-infra asynchronously or join our [Office Hours](https://github.com/pytorch/pytorch/wiki/Dev-Infra-Office-Hours) to give in-person feedback or get in-person help!
|
Please report any buggy instances to @pytorch/pytorch-dev-infra asynchronously or join our [Office Hours](https://github.com/pytorch/pytorch/wiki/Dev-Infra-Office-Hours) to give in-person feedback or get in-person help!
|
||||||
|
|
||||||
# @pytorchbot commands
|
# PyTorchBot Help
|
||||||
|
|
||||||
In order to invoke the bot on your PR, simply include a line that starts with `@pytorchbot` anywhere in a comment. That line will form the command; no multi-line commands are allowed. For example:
|
|
||||||
```
|
```
|
||||||
Some extra context, blah blah, wow this PR looks awesome
|
usage: @pytorchbot [-h] {merge,revert,rebase} ...
|
||||||
|
|
||||||
@pytorchbot merge
|
In order to invoke the bot on your PR, include a line that starts with
|
||||||
```
|
@pytorchbot anywhere in a comment. That line will form the command; no
|
||||||
|
multi-line commands are allowed.
|
||||||
|
|
||||||
## CI Flow
|
Example:
|
||||||
By default, the Lint and pull workflows should run on every push to your pull request. If that is not the case, tag @pytorch/pytorch-dev-infra with the instance. To trigger a set of non-default tests on your PR, add corresponding [labels](https://github.com/pytorch/pytorch/labels?q=ciflow) for the workflows you'd like to rerun (e.g., ciflow/trunk or ciflow/scheduled).
|
Some extra context, blah blah, wow this PR looks awesome
|
||||||
|
|
||||||
## Merging through GH1 (Beta)
|
@pytorchbot merge
|
||||||
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:
|
|
||||||
|
|
||||||
```
|
|
||||||
usage: @pytorchbot merge [-g] [-f]
|
|
||||||
|
|
||||||
optional arguments:
|
optional arguments:
|
||||||
-g, --green Merge when all status checks pass.
|
-h, --help Show this help message and exit.
|
||||||
-f, --force Merge without checking anything. ONLY USE THIS FOR CRITICAL
|
|
||||||
FAILURES.
|
|
||||||
```
|
|
||||||
|
|
||||||
Examples:
|
command:
|
||||||
|
{merge,revert,rebase}
|
||||||
|
merge Merge a PR
|
||||||
|
revert Revert a PR
|
||||||
|
rebase Rebase a PR
|
||||||
```
|
```
|
||||||
@pytorchbot merge
|
## Merge
|
||||||
@pytorchbot merge -g
|
|
||||||
```
|
```
|
||||||
## Reverting
|
usage: @pytorchbot merge [-g | -f]
|
||||||
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.
|
|
||||||
|
|
||||||
|
Merge an accepted PR, subject to the rules in .github/merge_rules.json.
|
||||||
|
By default, this will wait for all required checks to succeed before merging.
|
||||||
|
|
||||||
|
optional arguments:
|
||||||
|
-g, --green Merge when *all* status checks pass.
|
||||||
|
-f, --force Merge without checking anything. ONLY USE THIS FOR CRITICAL FAILURES.
|
||||||
```
|
```
|
||||||
usage: @pytorchbot revert -m MESSAGE
|
## Revert
|
||||||
[-c {nosignal,ignoredsignal,landrace,weird,ghfirst}]
|
```
|
||||||
|
usage: @pytorchbot revert -m MESSAGE [-c {nosignal,ignoredsignal,landrace,weird,ghfirst}]
|
||||||
|
|
||||||
|
Revert a merged PR. This requires that you are a Meta employee.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
@pytorchbot revert -m="This is breaking tests on trunk. hud.pytorch.org/" -c=nosignal
|
||||||
|
|
||||||
optional arguments:
|
optional arguments:
|
||||||
-m MESSAGE, --message MESSAGE
|
-m MESSAGE, --message MESSAGE
|
||||||
The reason you are reverting, will be put in the
|
The reason you are reverting, will be put in the commit message.
|
||||||
commit message.
|
|
||||||
-c {nosignal,ignoredsignal,landrace,weird,ghfirst}, --classification {nosignal,ignoredsignal,landrace,weird,ghfirst}
|
-c {nosignal,ignoredsignal,landrace,weird,ghfirst}, --classification {nosignal,ignoredsignal,landrace,weird,ghfirst}
|
||||||
A machine-friendly classification of the revert
|
A machine-friendly classification of the revert reason.
|
||||||
reason.
|
|
||||||
```
|
```
|
||||||
|
|
||||||
Examples:
|
|
||||||
|
|
||||||
```
|
|
||||||
@pytorchbot revert -m="This is breaking tests on trunk. hud.pytorch.org/" -c=nosignal
|
|
||||||
```
|
|
||||||
## Labeling
|
|
||||||
You can also add multiple labels using comments with pytorchbot.
|
|
||||||
|
|
||||||
```
|
|
||||||
@pytorchbot label label1,label2,etc
|
|
||||||
```
|
|
||||||
|
|
||||||
## Rebase
|
## Rebase
|
||||||
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. Rebasing defaults to the default branch of pytorch/pytorch, which currently is master. You, along with any member of the pytorch organization, can rebase your PR.
|
|
||||||
|
|
||||||
```
|
```
|
||||||
usage: @pytorchbot rebase [-s | -b BRANCH]
|
usage: @pytorchbot rebase [-s | -b BRANCH]
|
||||||
|
|
||||||
|
Rebase a PR. Rebasing defaults to the default branch of pytorch (master).
|
||||||
|
You, along with any member of the pytorch organization, can rebase your PR.
|
||||||
|
|
||||||
optional arguments:
|
optional arguments:
|
||||||
-s, --stable Rebase to viable/strict
|
-s, --stable Rebase to viable/strict
|
||||||
-b BRANCH, --branch BRANCH
|
-b BRANCH, --branch BRANCH
|
||||||
Branch you would like to rebase to
|
Branch you would like to rebase to
|
||||||
```
|
```
|
||||||
|
## Labeling
|
||||||
Examples:
|
You can also add multiple labels using comments with pytorchbot.
|
||||||
```
|
|
||||||
@pytorchbot rebase -s
|
|
||||||
```
|
|
||||||
|
|
||||||
<details>
|
|
||||||
<summary> deprecated commands </summary>
|
|
||||||
|
|
||||||
## @pytorchbot commands deprecated
|
|
||||||
The following commands are deprecated, you might find them used in the previous PRs, but due to the fundamental CI system changes, these commands do not work anymore.
|
|
||||||
|
|
||||||
```
|
```
|
||||||
# Deprecated chatops commands
|
@pytorchbot label label1,label2,etc
|
||||||
|
```
|
||||||
@pytorchbot retest this please
|
|
||||||
```
|
|
||||||
|
|
||||||
</details>
|
|
Reference in New Issue
Block a user