All GitHub teams belong to organization, and therefore must be
referenced as `org/team_name`
Add memoizable `gh_get_team_members` and tests that it can be used to
query existing and non-existing teams
Note: Requires "org.read" permission on the token to work function
Pull Request resolved: https://github.com/pytorch/pytorch/pull/74892
Approved by: https://github.com/janeyx99
If PR has associated differential revision, and "Meta Internal-Only Changes Check" status is not successful, it must be merged via Phabricator rather than GH Workflow.
Add test to validate this workflow
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73630
Approved by: https://github.com/seemethere
Adds clickable links within the Github UI for Approve By messages with
Github First merges
Signed-off-by: Eli Uriegas <eliuriegasfb.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73677
Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
Approved by: malfet
In some cases commit->author node can be null, if user is not GitHub
user
Add tests that use mock instead of querying github every time
Pull Request resolved: https://github.com/pytorch/pytorch/pull/73296
Do not use `lastestReviews` as indicator as to whether PR was reviewed
or not, as "COMMENTED" PRs take precedence over "APPROVED"
Instead, iterate over all reviews, which are in chronological order
(newest one are at the bottom) and keep latest review from the author
ignoring "COMMENTED" ones
Pull Request resolved: https://github.com/pytorch/pytorch/pull/72751
Summary:
Modify _check_output to capture `CalledProcessError` and add
stdout/stderr to the failure message
Also record github actions run id in the failure message (calculated based on `${{ github.run_id}}`)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71941
Reviewed By: seemethere
Differential Revision: D33829633
Pulled By: malfet
fbshipit-source-id: 060b2856ca6c71574075effa72b982f9e1d64e6e
(cherry picked from commit a9ad7df9b540f9ab14524a644cab5e06225debe4)
This adds `try_revert` repository dispatch that will revert commit
that were previously landed by merge workflow if requested by org member
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71868
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71596
Adds a dry_run to test out push as well as adding in a debug flag to
allow you to see what git commands are running
Signed-off-by: Eli Uriegas <eliuriegas@fb.com>
Test Plan: Imported from OSS
Reviewed By: malfet, bigfootjon
Differential Revision: D33695224
Pulled By: seemethere
fbshipit-source-id: 03bf6a3f2d9594089e134d95c3d35a6779ba7a26
(cherry picked from commit a75a402f9d02d5e4c709e25ca385264f854945d1)
Summary:
This one, will react to `repo_dispatch` event sent by PyTorch Probot
when `pytorchbot merge this` command is issued
At the moment, workflow will only attempt to merge PRs which has not
been created from forked repo and that match rules defined in
`.github/merge_rules.json`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/71488
Reviewed By: bigfootjon
Differential Revision: D33665142
Pulled By: malfet
fbshipit-source-id: e22daa1892523e62d7b7a941960636a6514cb7d7
(cherry picked from commit 92059bab073e2cd6ca6e9f946ffc2f956e22895c)