mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
Bot message changes for -f and rebase (#106150)
* Encourage people to use -i instead of -f for mergebot
* Add additional info for when rebase fails due to lacking permissions
<details><summary>dryrun</summary>
````
csl@csl-mbp ~/zzzzzzzz/pytorch [csl/errormsgs] $
(forpytorch) python3 .github/scripts/tryrebase.py 106089 --branch viable/strict --dry-run
+ git -C /Users/csl/zzzzzzzz/pytorch rev-parse --verify refs/remotes/origin/viable/strict
@pytorchbot started a rebase job onto [refs/remotes/origin/viable/strict](7c97c943fb
). Check the current status [here](None)
+ git -C /Users/csl/zzzzzzzz/pytorch fetch origin pull/106089/head:pull/106089/head
+ git -C /Users/csl/zzzzzzzz/pytorch rebase refs/remotes/origin/viable/strict pull/106089/head
+ git -C /Users/csl/zzzzzzzz/pytorch rev-parse --verify pull/106089/head
+ git -C /Users/csl/zzzzzzzz/pytorch rev-parse --verify refs/remotes/origin/viable/strict
+ git -C /Users/csl/zzzzzzzz/pytorch push --dry-run -f https://github.com/Lightning-Sandbox/pytorch.git pull/106089/head:fix/spaces
stdout:
remote: Permission to Lightning-Sandbox/pytorch.git denied to clee2000.
fatal: unable to access 'https://github.com/Lightning-Sandbox/pytorch.git/': The requested URL returned error: 403
stderr:
Rebase failed due to Command `git -C /Users/csl/zzzzzzzz/pytorch push --dry-run -f https://github.com/Lightning-Sandbox/pytorch.git pull/106089/head:fix/spaces` returned non-zero exit code 128
```
remote: Permission to Lightning-Sandbox/pytorch.git denied to clee2000.
fatal: unable to access 'https://github.com/Lightning-Sandbox/pytorch.git/': The requested URL returned error: 403
```
This is likely because the author did not allow edits from maintainers on the PR or because the repo has additional permissions settings that mergebot does not qualify.
````
</details>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/106150
Approved by: https://github.com/huydhn
This commit is contained in:
committed by
PyTorch MergeBot
parent
f15b6ec6d6
commit
57f23ca58b
3
.github/scripts/gitutils.py
vendored
3
.github/scripts/gitutils.py
vendored
@ -53,6 +53,9 @@ def _check_output(items: List[str], encoding: str = "utf-8") -> str:
|
||||
msg = f"Command `{' '.join(e.cmd)}` returned non-zero exit code {e.returncode}"
|
||||
stdout = e.stdout.decode(encoding) if e.stdout is not None else ""
|
||||
stderr = e.stderr.decode(encoding) if e.stderr is not None else ""
|
||||
# These get swallowed up, so print them here for debugging
|
||||
print(f"stdout: \n{stdout}")
|
||||
print(f"stderr: \n{stderr}")
|
||||
if len(stderr) == 0:
|
||||
msg += f"\n```\n{stdout}```"
|
||||
else:
|
||||
|
Reference in New Issue
Block a user