Catalog
fairoosansar-coder/approve-registry-update

fairoosansar-coder

approve-registry-update

Verify that an otelbot "Auto-update registry versions" PR is a pure version bump, then on confirmation, approve and add it to the merge queue. Use for otelbot/auto-update-registry-* PRs in open-telemetry/opentelemetry.io.

v1.0LATEST
NewUpdated Oct 29, 2026

Approve Registry Update

Fast-path review for otelbot Auto-update registry versions PRs (for example #10556), which bump the package.version field in data/registry/*.yml entries. Per sig-practices.md#prs-from-bots, these can be approved and merged immediately — but only after confirming the change is a clean version bump with no other field changes and no added or changed URLs (including no trailing comment on the version line).

Arguments

  • No argument (the happy path): discover the open registry auto-update PR(s) and process each one through the workflow below, confirming and approving each separately.

    gh pr list --state open --author app/otelbot \
      --search "head:otelbot/auto-update-registry" --json number,headRefName,title
    

    If none are open, say so and stop.

  • Argument given: resolve $ARGUMENTS to a PR number — a bare number, a #-prefixed number, or a GitHub URL with /pull/<N>. If unrecognizable, ask.

Scope

Use this skill only for otelbot registry auto-update PRs. Route other otelbot auto-update PRs (SDK, instrumentation, collector, spec) and any PR that turns out not to be a clean bump to the review-pull-request skill.

Workflow

1. Confirm it's a registry auto-update PR

Branch-discovered PRs already satisfy this; only re-check when a PR was passed as an argument:

gh pr view <N> --json author,headRefName,title,state

Require: author.login is app/otelbot, headRefName starts with otelbot/auto-update-registry-, title starts with Auto-update registry versions, and state is OPEN. If not, stop and say so.

2. Analyze the diff

These PRs touch 100+ files, so write the diff to a file and inspect it with grep — don't print it to the terminal. Prefer ./tmp (gitignored) when it exists, else /tmp. Derive everything below from the diff, not from gh pr view --json files (that field caps at 100 files and under-reports large PRs).

gh pr diff <N> > ./tmp/registry-<N>.diff

A clean bump produces no output from any guard check below:

D=./tmp/registry-<N>.diff
# a. Changed files outside data/registry/*.yml, or files added/deleted/renamed:
grep -E '^\+\+\+ ' "$D" | sed 's#^+++ b/##' | grep -vE '^data/registry/.*\.ya?ml$'
grep -E '^(new file|deleted file|rename|copy) ' "$D"
# b. Changed content lines that aren't a bare `version:` bump
#    (catches trailing comments, URLs, and any other field change):
grep -E '^[+-]' "$D" | grep -vE '^(\+\+\+|---) ' | grep -vE '^[+-][[:space:]]+version: [^#]*$'

Summarize the bumps grouped by old → new version (useful for the report and the approval comment):

python3 - "$D" <<'PY'
import sys, re, collections
diff = open(sys.argv[1]).read()
bumps = collections.Counter(); n = 0
for f in re.split(r'(?m)^diff --git ', diff):
    old = re.search(r'(?m)^-\s+version:\s*(\S+)', f)
    new = re.search(r'(?m)^\+\s+version:\s*(\S+)', f)
    if old and new:
        n += 1; bumps[(old.group(1), new.group(1))] += 1
print(f"{n} files bumped")
for (o, nw), c in bumps.most_common():
    print(f"  {o} -> {nw}  ({c})")
PY

3. Report

  • Clean (all guard checks empty): report "Version bumps only — N files, no other field changes, no added or changed URLs," followed by the grouped old → new summary.
  • Not clean: report what each non-empty check found and point at what to inspect — a non-version line means another field changed; a # or http on a changed line means a trailing comment or URL was added; a non-registry path or add/delete/rename means the PR is doing more than a bump. Do not approve — recommend /review-pull-request, then ask whether to post the summary as a PR comment.

4. Approve and enqueue

Only when the verdict is clean, ask: Approve #N and add it to the merge queue? On yes, approve with the summary in the comment body (not just LGTM), then enqueue:

gh pr review <N> --approve --body "Version bumps only — no other field changes, no added or changed URLs. Per sig-practices.md (PRs from bots).

<grouped old → new summary>"
gh pr merge <N>

The repo uses a squash merge queue, so gh pr merge <N> needs no strategy: it enqueues the PR (or enables auto-merge until checks pass). On no, stop.

References

Overall Score

87/100

Grade

A

Excellent

Grades are signals, not a certification. Always review a skill yourself before use.

Safety

88

Quality

88

Clarity

88

Completeness

84

Summary

This skill automates fast-path approval of otelbot registry version-bump PRs. It verifies PRs match a strict pattern (clean version bumps only), inspects diffs using grep to ensure no field changes or URL additions, and then approves and enqueues them. The skill is scoped exclusively to otelbot auto-update-registry PRs in the opentelemetry/opentelemetry.io repository.

Detected Capabilities

gh pr command executionfile write to tmpgrep pattern matchingpython script execution for diff analysisgithub api interaction

Trigger Keywords

Phrases that agents use to match this skill to user intent.

approve registry updateotelbot auto-updateversion bump prmerge queue enqueuefast-path pr review

Risk Signals

INFO

Python script execution via stdin

Workflow step 2 (Analyze the diff)
INFO

GitHub API write operation (PR approve and merge)

Workflow step 4 (Approve and enqueue)
INFO

Temporary file writes to ./tmp or /tmp

Workflow step 2 (Analyze the diff)

Referenced Domains

External domains referenced in skill content, detected by static analysis.

github.com

Use Cases

  • Approve otelbot registry auto-update PRs automatically
  • Verify registry version bumps contain no other changes
  • Enqueue clean registry update PRs to merge queue
  • Speed up review of repetitive registry version updates
  • Detect and flag non-clean registry PRs for manual review

Quality Notes

  • Excellent scope boundary: skill is explicitly limited to otelbot registry auto-updates, with explicit routing to another skill for non-clean PRs
  • Strong validation before approval: multiple guard checks (author, branch naming, title, state, diff analysis) prevent accidental approvals
  • Clear error handling: detailed reporting of why a PR fails validation, with guidance on what to inspect and which skill to route to
  • Efficient diff inspection: uses tmp files and grep patterns instead of terminal printing, avoiding information overload
  • Well-documented workflow: each step is clear with specific bash commands and validation logic
  • Python summary script is well-chosen for grouped version analysis and adds value to approval comments
  • Appropriate confirmation prompts before destructive actions (approve/merge)
  • Explicitly documents scope limitations and routing guidance for out-of-scope PRs
Model: claude-haiku-4-5-20251001Analyzed: Oct 29, 2026

Reviews

Add this skill to your library to leave a review.

No reviews yet

Be the first to share your experience.

Use fairoosansar-coder/approve-registry-update in your dev environment

Command Palette

Search for a command to run...