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: | 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 <&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 <&2 + exit 1 + fi + + # Build GraphQL query for discussions + GRAPHQL_QUERY=$(cat <&2 + exit 1 fi + # Build GraphQL query for discussions + GRAPHQL_QUERY=$(cat <