Commit d2aa3f5
[GHF][mergebot] record ghstack dependencies in the commit message (pytorch#105251)
Currently all information about the dependencies of ghstack PRs (e.g. pytorch#105010) is stripped away:
https://github.com/pytorch/pytorch/blob/c984885809194e0a807b3f5543450fae4dfa841a/.github/scripts/trymerge.py#L1077-L1078
This PR adds this information back in a more compact form. All dependencies (PR numbers) of each PR in ghstack are recorded.
The resulting commit message will look like this (the last line is new):
> Mock title (#123)
>
> Mock body text
> Pull Request resolved: pytorch#123
> Approved by: https://github.com/Approver1, https://github.com/Approver2
> ghstack dependencies: #1, #2
---
### Testing
Unit tests.
---
### Note Re: `# type: ignore[assignment]` in unit tests.
I did my due diligence to find alternatives. Unfortunately mypy [doesn't](python/mypy#6713) support this [way of patching methods](https://docs.python.org/3/library/unittest.mock-examples.html#mock-patching-methods), and the alternatives are either extremely verbose or don't work for this case. I decided it's not worth the effort (since the problem is limited only to the unit test).
Pull Request resolved: pytorch#105251
Approved by: https://github.com/huydhn1 parent 0ee3b84 commit d2aa3f5
File tree
4 files changed
+2520
-8
lines changed- .github/scripts
4 files changed
+2520
-8
lines changed
0 commit comments