From 54227c2d7dbaa65ccdb3dd43a9851e6c2a909f3d Mon Sep 17 00:00:00 2001 From: Jack Nam Date: Thu, 8 Jan 2026 11:26:26 -0800 Subject: [PATCH 1/3] add wrapper script --- .claude/agents/deploy-blocker-investigator.md | 4 +- .../commands/investigate-deploy-blocker.md | 2 +- .claude/scripts/removeDeployBlockerLabel.sh | 41 +++++++++++++++++++ .../workflows/deployBlockerInvestigation.yml | 6 ++- 4 files changed, 49 insertions(+), 4 deletions(-) create mode 100755 .claude/scripts/removeDeployBlockerLabel.sh diff --git a/.claude/agents/deploy-blocker-investigator.md b/.claude/agents/deploy-blocker-investigator.md index 3d32bf9f5bb5d..f44be223801c8 100644 --- a/.claude/agents/deploy-blocker-investigator.md +++ b/.claude/agents/deploy-blocker-investigator.md @@ -83,8 +83,8 @@ State which label you're removing (if any) and why. gh issue comment "$ISSUE_URL" --body "YOUR_COMMENT_HERE" # Remove label (backend bugs only): -gh issue edit "$ISSUE_URL" --remove-label DeployBlockerCash +removeDeployBlockerLabel.sh "$ISSUE_URL" DeployBlockerCash # Remove label if confirmed to be frontend bug and label exists -gh issue edit "$ISSUE_URL" --remove-label DeployBlocker +removeDeployBlockerLabel.sh "$ISSUE_URL" DeployBlocker ``` diff --git a/.claude/commands/investigate-deploy-blocker.md b/.claude/commands/investigate-deploy-blocker.md index d0f180b0b656e..ce96841f410f6 100644 --- a/.claude/commands/investigate-deploy-blocker.md +++ b/.claude/commands/investigate-deploy-blocker.md @@ -1,5 +1,5 @@ --- -allowed-tools: Bash(gh issue view:*),Bash(gh issue edit:* --remove-label DeployBlocker),Bash(gh issue edit:* --remove-label DeployBlockerCash),Bash(gh issue comment:*),Bash(gh issue list:*),Bash(gh pr view:*),Bash(gh pr list:*),Bash(gh api:*),Bash(git log:*),Bash(git show:*),Bash(git blame:*),Glob,Grep,Read +allowed-tools: Bash(gh issue view:*),Bash(gh issue comment:*),Bash(gh issue list:*),Bash(gh pr view:*),Bash(gh pr list:*),Bash(gh pr diff:*),Bash(gh api:*),Bash(git log:*),Bash(git show:*),Bash(git blame:*),Bash(removeDeployBlockerLabel.sh:*),Glob,Grep,Read description: Investigate a deploy blocker issue to find the causing PR and recommend resolution --- diff --git a/.claude/scripts/removeDeployBlockerLabel.sh b/.claude/scripts/removeDeployBlockerLabel.sh new file mode 100755 index 0000000000000..7789589066e7e --- /dev/null +++ b/.claude/scripts/removeDeployBlockerLabel.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# Secure proxy script to remove deploy blocker labels from GitHub issues. +# Only allows removing specific labels: DeployBlocker, DeployBlockerCash +set -eu + +readonly ALLOWED_LABELS=("DeployBlocker" "DeployBlockerCash") + +die() { + echo "Error: $*" >&2 + exit 1 +} + +usage() { + die "Usage: $0