Add config-driven test-bed utilities (utilities/)#7
Merged
Conversation
9b51a5c to
aa464fa
Compare
Adds the fork test-bed tooling so any contributor can iterate on dependabot-sweeper against their own fork of a target monorepo, without touching the shared upstream repo or its CI. - utilities/mirror-upstream-dependabot.sh — reset a fork to mirror upstream's open dependabot PRs (safe-by-default; --execute to apply; --only-missing for an incremental sync), applying optional utilities/patches/*.patch on top. - utilities/kill-run.sh — stop a run and tear down its fork footprint (close auto/fix/* PRs, delete branches, cancel their Taskcluster task groups), only ever touching the auto/fix/* namespace and only cancelling groups whose source is the target repo. - utilities/README.md — usage + the mandatory fork-safety rules. Fully config-driven and multi-user-ready: there are NO personal values in the committed scripts. Each user copies utilities/sweeper.env.example to utilities/sweeper.env (git-ignored) and sets FORK / UPSTREAM / PROJECT_ID / DASHBOARD_URL for their own fork and (optional) GCP project; the scripts source it (or read env vars / flags). FORK is required — there is no default — so a run can never silently target the wrong repo. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
aa464fa to
59e44ee
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Migrates the fork test-bed tooling into the repo so any contributor can iterate on
dependabot-sweeperagainst their own fork of a target monorepo, without touching the shared upstream repo or its CI. (Previously these scripts lived outside the repo and hardcoded one user's fork.)What's here (
utilities/)mirror-upstream-dependabot.sh— reset a fork to mirrorUPSTREAM's current open dependabot PRs, so a run against the fork is a faithful dry run. Safe-by-default (prints a plan);--executeto apply;--only-missingfor an incremental sync. Applies optionalutilities/patches/*.patchon top of upstreammain.kill-run.sh— stop a run and tear down its fork footprint: closeauto/fix/*PRs, delete their branches, cancel their Taskcluster task groups. Touches only theauto/fix/*namespace and only cancels groups whose decision-taskmetadata.sourcenames the target repo (the CI pools are shared).patches/0001-…— a fork-compat tweak to the upstream changelog check.README.md— usage + the mandatory fork-safety rules.sweeper.env.example— the per-user config template.Multi-user by design — no personal values committed
There are no hardcoded forks, accounts, GCP projects, or IPs in the committed scripts (verified). Each user:
The scripts source
utilities/sweeper.env(or read env vars / flags).FORKis required — there is no default — so a run can never silently target the wrong repo (verified: the guard exits non-zero with a clear message).UPSTREAMdefaults totaskcluster/taskcluster; deploy knobs (PROJECT_ID,ZONE,VM_NAME, …) reuse the existingdeploy/env/gcloud-config pattern, so separate contributors deploy to separate GCP projects.Verification
bash -non all scripts; theFORK-required guard fires (exit 2) when unset;--helpworks offline;gitconfirmssweeper.envis ignored and never staged. Not run end-to-end here (they mutate a live fork / need TC creds), but the logic is unchanged from the working originals plus the config-sourcing.Shell-only tooling — the Go CI (build/test) doesn't cover it.
🤖 Generated with Claude Code