From 1547fa240dafd363edd07847e7ac66045ffce37b Mon Sep 17 00:00:00 2001 From: Danny Neira <16809145+dannyneira@users.noreply.github.com> Date: Thu, 9 Jul 2026 18:27:01 -0600 Subject: [PATCH] fix: capture PR URL before composing Slack notification message The previous SKILL.md snippet had the pr_url capture line commented out, so the agent would hit a NameError when composing the Slack message body. - Uncomment and activate the subprocess call to gh pr view --json url - Add subprocess to imports - Remove stale Grafana token reference from workflow comment Co-Authored-By: Oz --- .agents/skills/release_updates/SKILL.md | 9 ++++++--- .github/workflows/release-docs-update.yml | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.agents/skills/release_updates/SKILL.md b/.agents/skills/release_updates/SKILL.md index 7ed6c31c..5675aeee 100644 --- a/.agents/skills/release_updates/SKILL.md +++ b/.agents/skills/release_updates/SKILL.md @@ -174,10 +174,13 @@ python3 .agents/skills/release_updates/scripts/run_release_updates.py \ After the PR is created, post a notification to the `#oncall-client` Slack channel (`C06MT1NRBFV`): ```python -import json, os, sys, urllib.request +import json, os, subprocess, sys, urllib.request + +# Capture the URL of the PR you just created +pr_url = subprocess.check_output( + ['gh', 'pr', 'view', '--json', 'url', '--jq', '.url'], text=True +).strip() -# pr_url: obtain from the PR created in the previous step, e.g.: -# pr_url = subprocess.check_output(['gh', 'pr', 'view', '--json', 'url', '--jq', '.url'], text=True).strip() token = os.environ.get('DOCS_SLACK_BOT_TOKEN') channel = 'C06MT1NRBFV' # #oncall-client if not token: diff --git a/.github/workflows/release-docs-update.yml b/.github/workflows/release-docs-update.yml index 06f1013a..c3ebc1cc 100644 --- a/.github/workflows/release-docs-update.yml +++ b/.github/workflows/release-docs-update.yml @@ -106,9 +106,9 @@ jobs: PY # Installs the stable oz CLI and runs the release_updates skill in the - # release-docs Oz environment (K5KStCm5aYvhfBJb8cHol6), which has - # DOCS_AGENT_GRAFANA_TOKEN configured for on-call reviewer assignment. + # release-docs Oz environment (K5KStCm5aYvhfBJb8cHol6). # WARP_API_KEY is the Docs Agent's API key. + # DOCS_SLACK_BOT_TOKEN must be added to the environment for Slack notifications. - name: Install Oz CLI run: | curl -sL "https://app.warp.dev/download/cli?os=linux&package=deb&arch=x86_64" -o /tmp/oz.deb