From cd37d9ecf3b57aa232aef3a1ae8e28f8495aaed2 Mon Sep 17 00:00:00 2001 From: Rachael Rose Renk <91027132+rachaelrenk@users.noreply.github.com> Date: Tue, 9 Jun 2026 12:51:21 -0600 Subject: [PATCH 1/2] docs: add release docs update workflow Co-Authored-By: Oz --- .github/workflows/release-docs-update.yml | 88 +++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 .github/workflows/release-docs-update.yml diff --git a/.github/workflows/release-docs-update.yml b/.github/workflows/release-docs-update.yml new file mode 100644 index 00000000..2ecf31ac --- /dev/null +++ b/.github/workflows/release-docs-update.yml @@ -0,0 +1,88 @@ +name: Release docs update + +on: + workflow_dispatch: + inputs: + channel_versions_ref: + description: Git ref in warpdotdev/channel-versions to use for channel_versions.json. + required: false + default: main + task_set: + description: Release update task set to run. + required: true + type: choice + default: changelog + options: + - changelog + - all + create_draft_pr: + description: Create release docs PRs as drafts during rollout. + required: true + type: boolean + default: true + assign_oncall_reviewers: + description: Assign primary and secondary client on-call reviewers. + required: true + type: boolean + default: false + repository_dispatch: + types: + - release-docs-update + +permissions: + contents: write + pull-requests: write + +concurrency: + group: release-docs-update-${{ github.event.client_payload.channel_versions_ref || inputs.channel_versions_ref || github.run_id }} + cancel-in-progress: false + +jobs: + release-docs-update: + name: Run release docs update agent + runs-on: ubuntu-latest + steps: + - name: Checkout docs + uses: actions/checkout@v4 + + # This workflow intentionally has no automatic push trigger yet. + # Enable automatic execution only after: + # 1. workflow_dispatch succeeds. + # 2. the channel-versions dispatch sender is tested. + # 3. required secrets, variables, and cross-repo permissions are configured. + - name: Run release docs update with Oz + uses: warpdotdev/oz-agent-action@v1 + with: + skill: warpdotdev/docs:release_updates + warp_api_key: ${{ secrets.WARP_API_KEY }} + profile: ${{ vars.WARP_AGENT_PROFILE || '' }} + prompt: | + Run the release docs update workflow from the `release_updates` skill. + + Trigger context: + - Source: ${{ github.event_name }} + - channel_versions_ref: ${{ github.event.client_payload.channel_versions_ref || inputs.channel_versions_ref || 'main' }} + - task_set: ${{ github.event.client_payload.task_set || inputs.task_set || 'changelog' }} + - create_draft_pr from workflow_dispatch: ${{ inputs.create_draft_pr }} + - create_draft_pr from repository_dispatch: ${{ github.event.client_payload.create_draft_pr }} + - assign_oncall_reviewers from workflow_dispatch: ${{ inputs.assign_oncall_reviewers }} + - assign_oncall_reviewers from repository_dispatch: ${{ github.event.client_payload.assign_oncall_reviewers }} + + Use these rollout rules: + 1. Treat `changelog` as the safe first rollout mode. If task_set is `changelog`, run only the changelog task. + 2. Treat `all` as the full release-maintenance mode. If task_set is `all`, run the default ordered tasks from the skill. + 3. Use `warpdotdev/channel-versions` at channel_versions_ref as the source of `channel_versions.json`. + 4. Create and switch to a release docs feature branch before invoking `run_release_updates.py --create-pr`; the script refuses to create a PR from `main`. + 5. Create or update a PR against `warpdotdev/docs` `main` only if generated changes exist. + 6. Use a draft PR when the active trigger's create_draft_pr value is true. + 7. Assign on-call reviewers only when the active trigger's assign_oncall_reviewers value is true and the required Grafana schedule IDs and `GRAFANA_API_KEY` are available. + 8. Run `npm run build` before considering the PR ready for review. + 9. If no docs changes are needed, report a no-op result and do not open a PR. + + Expected command shape after the environment is prepared: + - branch setup: derive a safe branch suffix from channel_versions_ref, then run `git checkout -b release-docs/` + - changelog-only: `python3 .agents/skills/release_updates/scripts/run_release_updates.py --tasks changelog --create-pr --pr-base main` + - all tasks: `python3 .agents/skills/release_updates/scripts/run_release_updates.py --create-pr --pr-base main` + + Include `--pr-draft` when create_draft_pr is true. + Include `--assign-oncall-reviewer` and repeated `--oncall-schedule-id` values only when reviewer assignment is enabled and configured. From 1d1a26294015733080487378949b626f5cab2ddb Mon Sep 17 00:00:00 2001 From: Rachael Rose Renk <91027132+rachaelrenk@users.noreply.github.com> Date: Tue, 9 Jun 2026 14:09:53 -0600 Subject: [PATCH 2/2] docs: validate release docs workflow inputs Co-Authored-By: Oz --- .github/workflows/release-docs-update.yml | 86 ++++++++++++++++++++--- 1 file changed, 76 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release-docs-update.yml b/.github/workflows/release-docs-update.yml index 2ecf31ac..31d7d079 100644 --- a/.github/workflows/release-docs-update.yml +++ b/.github/workflows/release-docs-update.yml @@ -34,7 +34,7 @@ permissions: pull-requests: write concurrency: - group: release-docs-update-${{ github.event.client_payload.channel_versions_ref || inputs.channel_versions_ref || github.run_id }} + group: release-docs-update-${{ github.run_id }} cancel-in-progress: false jobs: @@ -45,6 +45,76 @@ jobs: - name: Checkout docs uses: actions/checkout@v4 + - name: Normalize trigger inputs + id: trigger-inputs + env: + EVENT_NAME: ${{ github.event_name }} + WORKFLOW_CHANNEL_VERSIONS_REF: ${{ inputs.channel_versions_ref }} + WORKFLOW_TASK_SET: ${{ inputs.task_set }} + WORKFLOW_CREATE_DRAFT_PR: ${{ inputs.create_draft_pr }} + WORKFLOW_ASSIGN_ONCALL_REVIEWERS: ${{ inputs.assign_oncall_reviewers }} + DISPATCH_CHANNEL_VERSIONS_REF: ${{ github.event.client_payload.channel_versions_ref }} + DISPATCH_TASK_SET: ${{ github.event.client_payload.task_set }} + DISPATCH_CREATE_DRAFT_PR: ${{ github.event.client_payload.create_draft_pr }} + DISPATCH_ASSIGN_ONCALL_REVIEWERS: ${{ github.event.client_payload.assign_oncall_reviewers }} + run: | + python3 <<'PY' + import json + import os + import re + import sys + + event_name = os.environ["EVENT_NAME"] + if event_name == "repository_dispatch": + raw = { + "channel_versions_ref": os.environ.get("DISPATCH_CHANNEL_VERSIONS_REF") or "main", + "task_set": os.environ.get("DISPATCH_TASK_SET") or "changelog", + "create_draft_pr": os.environ.get("DISPATCH_CREATE_DRAFT_PR") or "true", + "assign_oncall_reviewers": os.environ.get("DISPATCH_ASSIGN_ONCALL_REVIEWERS") or "false", + } + else: + raw = { + "channel_versions_ref": os.environ.get("WORKFLOW_CHANNEL_VERSIONS_REF") or "main", + "task_set": os.environ.get("WORKFLOW_TASK_SET") or "changelog", + "create_draft_pr": os.environ.get("WORKFLOW_CREATE_DRAFT_PR") or "true", + "assign_oncall_reviewers": os.environ.get("WORKFLOW_ASSIGN_ONCALL_REVIEWERS") or "false", + } + + channel_ref = raw["channel_versions_ref"].strip() + if not re.fullmatch(r"[A-Za-z0-9._/@-]{1,100}", channel_ref): + print("Invalid channel_versions_ref. Use only letters, numbers, '.', '_', '/', '@', or '-'.", file=sys.stderr) + raise SystemExit(1) + + task_set = raw["task_set"].strip() + if task_set not in {"changelog", "all"}: + print("Invalid task_set. Expected 'changelog' or 'all'.", file=sys.stderr) + raise SystemExit(1) + + def normalize_bool(name: str) -> str: + value = raw[name].strip().lower() + if value in {"true", "1", "yes"}: + return "true" + if value in {"false", "0", "no"}: + return "false" + print(f"Invalid {name}. Expected boolean true/false.", file=sys.stderr) + raise SystemExit(1) + + normalized = { + "source": event_name, + "channel_versions_ref": channel_ref, + "task_set": task_set, + "create_draft_pr": normalize_bool("create_draft_pr"), + "assign_oncall_reviewers": normalize_bool("assign_oncall_reviewers"), + } + + with open(os.environ["GITHUB_OUTPUT"], "a", encoding="utf-8") as output: + for key, value in normalized.items(): + print(f"{key}={value}", file=output) + print("json<` + - branch setup: derive a safe branch suffix from `${{ steps.trigger-inputs.outputs.channel_versions_ref }}`, then run `git checkout -b release-docs/` - changelog-only: `python3 .agents/skills/release_updates/scripts/run_release_updates.py --tasks changelog --create-pr --pr-base main` - all tasks: `python3 .agents/skills/release_updates/scripts/run_release_updates.py --create-pr --pr-base main`