From 3c0dd14ca13a2a3d701ea0a12c0990dcd4ccfcdb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 22 Jan 2026 18:15:41 +0000 Subject: [PATCH 1/5] Initial plan From fca97dc25fd0e7b78c919568bd841168f88d1dee Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 22 Jan 2026 18:21:47 +0000 Subject: [PATCH 2/5] Debug discussion-comment task failure - identify root cause Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/daily-fact.lock.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/daily-fact.lock.yml b/.github/workflows/daily-fact.lock.yml index 7b9ab9e671..1f391ecb4e 100644 --- a/.github/workflows/daily-fact.lock.yml +++ b/.github/workflows/daily-fact.lock.yml @@ -1052,7 +1052,7 @@ jobs: uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 env: GH_AW_AGENT_OUTPUT: ${{ env.GH_AW_AGENT_OUTPUT }} - GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"max\":1,\"target\":\"4750\"},\"missing_data\":{},\"missing_tool\":{}}" + GH_AW_SAFE_OUTPUTS_HANDLER_CONFIG: "{\"add_comment\":{\"discussion\":true,\"max\":1,\"target\":\"4750\"},\"missing_data\":{},\"missing_tool\":{}}" with: github-token: ${{ secrets.GH_AW_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} script: | From ba06ba7634681bebc4e94a6fef99c3ba1bc2e388 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 22 Jan 2026 18:26:37 +0000 Subject: [PATCH 3/5] Fix github-discussion-query tool to use GraphQL API Replace gh discussion list (unsupported) with gh api graphql. The gh CLI in GitHub Actions doesn't have a 'discussion' subcommand, so we use the GraphQL API to query discussions instead. - Parse repo owner/name from INPUT_REPO or GitHub context - Build GraphQL query for discussions with proper fields - Transform GraphQL output to match expected format - Maintains backward compatibility with existing jq filters Fixes discussion-comment task failure in smoke tests. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .../shared/github-queries-safe-input.md | 72 +++++++++++++++++-- .github/workflows/smoke-claude.lock.yml | 72 +++++++++++++++++-- 2 files changed, 132 insertions(+), 12 deletions(-) diff --git a/.github/workflows/shared/github-queries-safe-input.md b/.github/workflows/shared/github-queries-safe-input.md index 4c3f9fb693..ad3a225b81 100644 --- a/.github/workflows/shared/github-queries-safe-input.md +++ b/.github/workflows/shared/github-queries-safe-input.md @@ -217,16 +217,76 @@ safe-inputs: LIMIT="${INPUT_LIMIT:-30}" JQ_FILTER="${INPUT_JQ:-}" - # JSON fields to fetch - JSON_FIELDS="number,title,author,createdAt,updatedAt,body,category,labels,comments,answer,url" - - # Build and execute gh command + # Parse repository owner and name if [[ -n "$REPO" ]]; then - OUTPUT=$(gh discussion list --limit "$LIMIT" --json "$JSON_FIELDS" --repo "$REPO") + OWNER=$(echo "$REPO" | cut -d'/' -f1) + NAME=$(echo "$REPO" | cut -d'/' -f2) else - OUTPUT=$(gh discussion list --limit "$LIMIT" --json "$JSON_FIELDS") + # Get current repository from GitHub context + OWNER="${GITHUB_REPOSITORY_OWNER:-}" + NAME=$(echo "${GITHUB_REPOSITORY:-}" | cut -d'/' -f2) fi + # Validate owner and name + if [[ -z "$OWNER" || -z "$NAME" ]]; then + echo "Error: Could not determine repository owner and name" >&2 + exit 1 + fi + + # Build GraphQL query for discussions + GRAPHQL_QUERY=$(cat <&2 + exit 1 fi + # Build GraphQL query for discussions + GRAPHQL_QUERY=$(cat < Date: Thu, 22 Jan 2026 18:27:02 +0000 Subject: [PATCH 4/5] Recompile workflows using github-discussion-query tool Recompile all workflows that import shared/github-queries-safe-input.md to apply the GraphQL API fix for discussion queries. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .github/workflows/daily-regulatory.lock.yml | 72 +++++++++++++++++++-- .github/workflows/smoke-codex.lock.yml | 72 +++++++++++++++++++-- .github/workflows/smoke-copilot.lock.yml | 72 +++++++++++++++++++-- .github/workflows/smoke-opencode.lock.yml | 72 +++++++++++++++++++-- 4 files changed, 264 insertions(+), 24 deletions(-) diff --git a/.github/workflows/daily-regulatory.lock.yml b/.github/workflows/daily-regulatory.lock.yml index 4b61521a9b..e54706efe9 100644 --- a/.github/workflows/daily-regulatory.lock.yml +++ b/.github/workflows/daily-regulatory.lock.yml @@ -553,16 +553,76 @@ jobs: LIMIT="${INPUT_LIMIT:-30}" JQ_FILTER="${INPUT_JQ:-}" - # JSON fields to fetch - JSON_FIELDS="number,title,author,createdAt,updatedAt,body,category,labels,comments,answer,url" - - # Build and execute gh command + # Parse repository owner and name if [[ -n "$REPO" ]]; then - OUTPUT=$(gh discussion list --limit "$LIMIT" --json "$JSON_FIELDS" --repo "$REPO") + OWNER=$(echo "$REPO" | cut -d'/' -f1) + NAME=$(echo "$REPO" | cut -d'/' -f2) else - OUTPUT=$(gh discussion list --limit "$LIMIT" --json "$JSON_FIELDS") + # Get current repository from GitHub context + OWNER="${GITHUB_REPOSITORY_OWNER:-}" + NAME=$(echo "${GITHUB_REPOSITORY:-}" | cut -d'/' -f2) + fi + + # Validate owner and name + if [[ -z "$OWNER" || -z "$NAME" ]]; then + echo "Error: Could not determine repository owner and name" >&2 + exit 1 fi + # Build GraphQL query for discussions + GRAPHQL_QUERY=$(cat <&2 + exit 1 fi + # Build GraphQL query for discussions + GRAPHQL_QUERY=$(cat <&2 + exit 1 + fi + + # Build GraphQL query for discussions + GRAPHQL_QUERY=$(cat <&2 + exit 1 fi + # Build GraphQL query for discussions + GRAPHQL_QUERY=$(cat < Date: Thu, 22 Jan 2026 18:30:11 +0000 Subject: [PATCH 5/5] Fix inline github-discussion-query in daily-performance-summary The daily-performance-summary.md workflow had an inline definition of github-discussion-query that overrides the shared import. Updated the inline definition to also use GraphQL API. Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- .../daily-performance-summary.lock.yml | 72 +++++++++++++++++-- .../workflows/daily-performance-summary.md | 72 +++++++++++++++++-- 2 files changed, 132 insertions(+), 12 deletions(-) diff --git a/.github/workflows/daily-performance-summary.lock.yml b/.github/workflows/daily-performance-summary.lock.yml index f081540eb4..0d187a71f4 100644 --- a/.github/workflows/daily-performance-summary.lock.yml +++ b/.github/workflows/daily-performance-summary.lock.yml @@ -621,16 +621,76 @@ jobs: LIMIT="${INPUT_LIMIT:-30}" JQ_FILTER="${INPUT_JQ:-}" - # JSON fields to fetch - JSON_FIELDS="number,title,author,createdAt,updatedAt,body,category,labels,comments,answer,url" - - # Build and execute gh command + # Parse repository owner and name if [[ -n "$REPO" ]]; then - OUTPUT=$(gh discussion list --limit "$LIMIT" --json "$JSON_FIELDS" --repo "$REPO") + OWNER=$(echo "$REPO" | cut -d'/' -f1) + NAME=$(echo "$REPO" | cut -d'/' -f2) else - OUTPUT=$(gh discussion list --limit "$LIMIT" --json "$JSON_FIELDS") + # Get current repository from GitHub context + OWNER="${GITHUB_REPOSITORY_OWNER:-}" + NAME=$(echo "${GITHUB_REPOSITORY:-}" | cut -d'/' -f2) + fi + + # Validate owner and name + if [[ -z "$OWNER" || -z "$NAME" ]]; then + echo "Error: Could not determine repository owner and name" >&2 + exit 1 fi + # Build GraphQL query for discussions + GRAPHQL_QUERY=$(cat <&2 + exit 1 + fi + + # Build GraphQL query for discussions + GRAPHQL_QUERY=$(cat <