Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace pr_monitor with a GitHub Actions workflow. #6935

Open
mhucka opened this issue Jan 9, 2025 · 0 comments
Open

Replace pr_monitor with a GitHub Actions workflow. #6935

mhucka opened this issue Jan 9, 2025 · 0 comments
Labels
kind/health For CI/testing/release process/refactoring/technical debt items

Comments

@mhucka
Copy link
Contributor

mhucka commented Jan 9, 2025

Description of the issue

It seems like the pr_monitor bot for Cirq is not currently running. Issue #6024 suggests there was a problem last year, but it's clear if the problem was ever resolved (though the issue is still open). The files in dev_tools/pr_monitor/ and dev_tools/cirq-infra/ indicate that the bot is supposed to be running in a GCP project.

Relatedly, issue #4310 from 2021 talk about dev_tools/auto_merge.py, but that file doesn't exist anymore. It seems like its purpose is to auto-merge PRs if certain conditions are met. In issue #4852, @Strilanc suggested replacing Cirq's automerge bot with GitHub's native PR automerge feature. The reason it was not done at the time seems to be that GitHub's facility does not auto-update the branch (and it still doesn't, even today).

I looked for a GitHub setting that would make it do that, and didn't find any; however, this led to the discovery of the following GitHub Actions in the marketplace: https://github.com/marketplace/actions/merge-pull-requests-automerge-action:

When added, this action will run the following tasks on pull requests with the automerge label:

  • Changes from the base branch will automatically be merged into the pull request (only when "Require branches to be up to date before merging" is enabled in the branch protection rules)
  • When the pull request is ready, it will automatically be merged. The action will only wait for status checks that are marked as required in the branch protection rules
  • Pull requests without any configured labels will be ignored

This appears to be basically what pr_monitor is supposed to do. If that interpretation is correct, and people agree, I'll open a PR to:

  1. add that action & configure it
  2. remove dev_tools/pr_monitor/
  3. remove dev_tools/cirq-infra/

and also, if there is indeed a GCP setup somewhere for pr_monitor, we can remove that.

Cirq version

1.5.0.dev

@mhucka mhucka added the kind/health For CI/testing/release process/refactoring/technical debt items label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/health For CI/testing/release process/refactoring/technical debt items
Projects
None yet
Development

No branches or pull requests

1 participant