Skip to content

[MergeRules] Make Metamates group explicit - #176303

Closed
malfet wants to merge 6 commits into
gh/malfet/750/basefrom
gh/malfet/750/head
Closed

malfet wants to merge 6 commits into
gh/malfet/750/basefrom
gh/malfet/750/head

Conversation

@malfet

@malfet malfet commented Mar 3, 2026 •

Copy link
Copy Markdown
Collaborator

Stack from ghstack (oldest at bottom):

Updated using .github/scripts/update_metamates_rules.py that adds every Metamate that reviewed a 3+ PRs in last 30 days to the list of reviewers

Followup PR will run this script periodically to generate PRs with contributors updates. This way new contributors will be added automatically after they shadow reviewed 3 PRs together with existing reviewers

[ghstack-poisoned]
@malfet
malfet requested a review from a team as a code owner March 3, 2026 16:12
@pytorch-bot

pytorch-bot Bot commented Mar 3, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/176303

Note: Links to docs will display an error until the docs builds have been completed.

⏳ No Failures, 1 Pending

As of commit 350f59b with merge base b72efe9 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@albanD albanD left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds fair, my main question would be: what is the process for people to be added there?

@@ -0,0 +1,145 @@
#!/usr/bin/env python3

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: should this be in scripts/ ?

[ghstack-poisoned]
malfet added a commit that referenced this pull request Mar 3, 2026
Updated using `.github/update_metamates_rules.py`

ghstack-source-id: 664cd52
Pull-Request: #176303
@malfet

malfet commented Mar 3, 2026

Copy link
Copy Markdown
Collaborator Author

That sounds fair, my main question would be: what is the process for people to be added there?

I have two ideas:

  • If AI acceleration progresses at current pace, this list will become moot as the only reviewer who really matters will be @claude ;)
  • Old school approach: new person shadow reviews 3 PRs, and update script will be running periodically to keep reviewers list always up to date

@claude

claude Bot commented Mar 3, 2026 •

Copy link
Copy Markdown

Claude finished @malfet's task in 1m 11s —— View job


  • Gather context on the PR and lint failure
  • Respond to the mention

Thanks for the vote of confidence! Though I suspect human reviewers will remain essential for a while yet -- code review involves a lot of nuanced judgment about project direction and design trade-offs that benefits from institutional context.

On a more practical note: the CI lint job (lintrunner-noclang-partial) is currently failing with a PYFMT formatting issue in .github/update_metamates_rule.py. The linter wants:

  1. An extra blank line after the import yaml block (before MIN_APPROVALS)
  2. One-argument-per-line formatting for the subprocess.run call arguments in fetch_metamates() and fetch_approvers()
  3. Multi-line formatting for the print() error calls

Running lintrunner -a on that file should auto-fix these.

[ghstack-poisoned]
malfet added a commit that referenced this pull request Mar 3, 2026
Updated using `.github/update_metamates_rules.py`

ghstack-source-id: 80c4a16
Pull-Request: #176303
[ghstack-poisoned]
malfet added a commit that referenced this pull request Mar 5, 2026
Updated using `.github/update_metamates_rules.py`

ghstack-source-id: b91b136
Pull-Request: #176303

@albanD albanD left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's regen and land this!

[ghstack-poisoned]
malfet added a commit that referenced this pull request May 1, 2026
Updated using `.github/scripts/update_metamates_rule.py`

ghstack-source-id: 2f6daab
Pull-Request: #176303
[ghstack-poisoned]
malfet added a commit that referenced this pull request May 1, 2026
Updated using `.github/scripts/update_metamates_rule.py`

ghstack-source-id: a127728
Pull-Request: #176303
@malfet

malfet commented May 1, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchbot megre -f "Lint is green, rules looks reasonable"

@pytorch-bot

pytorch-bot Bot commented May 1, 2026

Copy link
Copy Markdown

❌ 🤖 pytorchbot command failed:

@pytorchbot: error: argument command: invalid choice: 'megre' (choose from 'merge', 'revert', 'rebase', 'label', 'drci', 'lint', 'fix-lint', 'apply-lint', 'cherry-pick')

usage: @pytorchbot [-h]
                   
                   {merge,revert,rebase,label,drci,lint,fix-lint,apply-lint,cherry-pick}
                   ...

Try @pytorchbot --help for more info.

@malfet

malfet commented May 1, 2026

Copy link
Copy Markdown
Collaborator Author

@pytorchbot merge -f "Lint is green, rules looks reasonable"

@pytorchmergebot

Copy link
Copy Markdown
Collaborator

Merge started

Your change will be merged immediately since you used the force (-f) flag, bypassing any CI checks (ETA: 1-5 minutes). Please use -f as last resort and instead consider -i/--ignore-current to continue the merge ignoring current failures. This will allow currently pending tests to finish and report signal before the merge.

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Alokksinha00 pushed a commit to Alokksinha00/pytorch that referenced this pull request May 15, 2026
Updated using `.github/scripts/update_metamates_rules.py` that adds every Metamate that reviewed a 3+ PRs in last 30 days to the list of reviewers

Followup PR will run this script periodically to generate PRs with contributors updates. This way new contributors will be added automatically after they shadow reviewed 3 PRs together with existing reviewers
Pull Request resolved: pytorch#176303
Approved by: https://github.com/albanD
@github-actions
github-actions Bot deleted the gh/malfet/750/head branch May 31, 2026 02:29
aperson30 pushed a commit to aperson30/pytorch that referenced this pull request Jun 20, 2026
Updated using `.github/scripts/update_metamates_rules.py` that adds every Metamate that reviewed a 3+ PRs in last 30 days to the list of reviewers

Followup PR will run this script periodically to generate PRs with contributors updates. This way new contributors will be added automatically after they shadow reviewed 3 PRs together with existing reviewers
Pull Request resolved: pytorch#176303
Approved by: https://github.com/albanD
huydhn added a commit that referenced this pull request Jul 15, 2026
…r PR

The `update-metamates-rule` job has failed on every scheduled run since it
was added in #176303: `UPDATEBOT_TOKEN` belongs to pytorchupdatebot, which
is not a member of the pytorch org, so it cannot enumerate the `closed`
pytorch/metamates team (GitHub reports it as needing `admin:org`).

Fix: run the fetch step with `GH_PYTORCHBOT_TOKEN` (pytorchbot is an org
member and can read the closed team with read:org). The checkout and the
"Create or update PR" step keep using `UPDATEBOT_TOKEN`, so the branch push
and PR are still authored by pytorchupdatebot as before.

Test Plan:

Validated the workflow YAML parses:

```
python -c "import yaml; yaml.safe_load(open('.github/workflows/nightly.yml'))"
```

End-to-end verification requires dispatching the nightly workflow on the
real repo (the job is gated to pytorch org + schedule/workflow_dispatch and
depends on the org-scoped secrets), which is why this is pushed as a
non-forked branch.

This PR was authored with the assistance of an AI coding agent.
huydhn added a commit that referenced this pull request Jul 15, 2026
…t token

The update-metamates-rule job has failed on every scheduled run since it was
added in #176303. It reads the closed pytorch/metamates team, but
UPDATEBOT_TOKEN belongs to pytorchupdatebot, which is not a pytorch org member
and so cannot enumerate the team's members (GitHub reports it as needing
admin:org). Read the team with GH_PYTORCHBOT_TOKEN (pytorchbot is an org
member); keep UPDATEBOT_TOKEN for checkout and the PR.

This PR was authored with the assistance of an AI coding agent.
pytorchmergebot pushed a commit that referenced this pull request Jul 15, 2026
…t token (#189962)

Fixes #189032

The `update-metamates-rule` job has failed on every scheduled run since it was added in #176303. It reads the `closed` pytorch/metamates team, but `UPDATEBOT_TOKEN` belongs to pytorchupdatebot, which is not a pytorch org member and so cannot enumerate the team's members (GitHub reports it as needing `admin:org`).

Fix: read the team with `GH_PYTORCHBOT_TOKEN` (pytorchbot is an org member); keep `UPDATEBOT_TOKEN` for checkout and the PR.

### Testing

* Example failure https://github.com/pytorch/pytorch/actions/runs/29382038881/job/87247646479
* Successful run with the right token https://github.com/pytorch/pytorch/actions/runs/29382692304/job/87249529930
Pull Request resolved: #189962
Approved by: https://github.com/jeanschmidt
gplutop7 pushed a commit to gplutop7/pytorch that referenced this pull request Jul 15, 2026
Updated using `.github/scripts/update_metamates_rules.py` that adds every Metamate that reviewed a 3+ PRs in last 30 days to the list of reviewers

Followup PR will run this script periodically to generate PRs with contributors updates. This way new contributors will be added automatically after they shadow reviewed 3 PRs together with existing reviewers
Pull Request resolved: pytorch#176303
Approved by: https://github.com/albanD
vishalgoyal316 pushed a commit to vishalgoyal316/pytorch that referenced this pull request Jul 16, 2026
…t token (pytorch#189962)

Fixes pytorch#189032

The `update-metamates-rule` job has failed on every scheduled run since it was added in pytorch#176303. It reads the `closed` pytorch/metamates team, but `UPDATEBOT_TOKEN` belongs to pytorchupdatebot, which is not a pytorch org member and so cannot enumerate the team's members (GitHub reports it as needing `admin:org`).

Fix: read the team with `GH_PYTORCHBOT_TOKEN` (pytorchbot is an org member); keep `UPDATEBOT_TOKEN` for checkout and the PR.

### Testing

* Example failure https://github.com/pytorch/pytorch/actions/runs/29382038881/job/87247646479
* Successful run with the right token https://github.com/pytorch/pytorch/actions/runs/29382692304/job/87249529930
Pull Request resolved: pytorch#189962
Approved by: https://github.com/jeanschmidt
DamJanusz pushed a commit to DamJanusz/pytorch that referenced this pull request Jul 21, 2026
…t token (pytorch#189962)

Fixes pytorch#189032

The `update-metamates-rule` job has failed on every scheduled run since it was added in pytorch#176303. It reads the `closed` pytorch/metamates team, but `UPDATEBOT_TOKEN` belongs to pytorchupdatebot, which is not a pytorch org member and so cannot enumerate the team's members (GitHub reports it as needing `admin:org`).

Fix: read the team with `GH_PYTORCHBOT_TOKEN` (pytorchbot is an org member); keep `UPDATEBOT_TOKEN` for checkout and the PR.

### Testing

* Example failure https://github.com/pytorch/pytorch/actions/runs/29382038881/job/87247646479
* Successful run with the right token https://github.com/pytorch/pytorch/actions/runs/29382692304/job/87249529930
Pull Request resolved: pytorch#189962
Approved by: https://github.com/jeanschmidt
youlituao pushed a commit to youlituao/pytorch that referenced this pull request Jul 28, 2026
…t token (pytorch#189962)

Fixes pytorch#189032

The `update-metamates-rule` job has failed on every scheduled run since it was added in pytorch#176303. It reads the `closed` pytorch/metamates team, but `UPDATEBOT_TOKEN` belongs to pytorchupdatebot, which is not a pytorch org member and so cannot enumerate the team's members (GitHub reports it as needing `admin:org`).

Fix: read the team with `GH_PYTORCHBOT_TOKEN` (pytorchbot is an org member); keep `UPDATEBOT_TOKEN` for checkout and the PR.

### Testing

* Example failure https://github.com/pytorch/pytorch/actions/runs/29382038881/job/87247646479
* Successful run with the right token https://github.com/pytorch/pytorch/actions/runs/29382692304/job/87249529930
Pull Request resolved: pytorch#189962
Approved by: https://github.com/jeanschmidt
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
Updated using `.github/scripts/update_metamates_rules.py` that adds every Metamate that reviewed a 3+ PRs in last 30 days to the list of reviewers

Followup PR will run this script periodically to generate PRs with contributors updates. This way new contributors will be added automatically after they shadow reviewed 3 PRs together with existing reviewers
Pull Request resolved: pytorch#176303
Approved by: https://github.com/albanD
aws-kingrj pushed a commit to amazon-contributing/upstream-to-pytorch that referenced this pull request Jul 29, 2026
…t token (pytorch#189962)

Fixes pytorch#189032

The `update-metamates-rule` job has failed on every scheduled run since it was added in pytorch#176303. It reads the `closed` pytorch/metamates team, but `UPDATEBOT_TOKEN` belongs to pytorchupdatebot, which is not a pytorch org member and so cannot enumerate the team's members (GitHub reports it as needing `admin:org`).

Fix: read the team with `GH_PYTORCHBOT_TOKEN` (pytorchbot is an org member); keep `UPDATEBOT_TOKEN` for checkout and the PR.

### Testing

* Example failure https://github.com/pytorch/pytorch/actions/runs/29382038881/job/87247646479
* Successful run with the right token https://github.com/pytorch/pytorch/actions/runs/29382692304/job/87249529930
Pull Request resolved: pytorch#189962
Approved by: https://github.com/jeanschmidt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants