diff --git a/.github/workflows/daily-community-attribution.lock.yml b/.github/workflows/daily-community-attribution.lock.yml index ff9a677a3ef..b5c1acf079a 100644 --- a/.github/workflows/daily-community-attribution.lock.yml +++ b/.github/workflows/daily-community-attribution.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"f9a235315ceb1ebd87e56c92290e68051feecea0221443888832d6c565f4d22e","strict":true,"agent_id":"copilot","agent_model":"claude-haiku-4.5"} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"664582fbecf63f658809a2070f8cfe66c9fd6e277fafc157d7c34715dbdda183","strict":true,"agent_id":"copilot","agent_model":"claude-haiku-4.5"} # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_CI_TRIGGER_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GH_AW_OTEL_ENDPOINT","GH_AW_OTEL_HEADERS","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"373c709c69115d41ff229c7e5df9f8788daa9553","version":"v9"},{"repo":"actions/setup-node","sha":"48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.28","digest":"sha256:a8834e285807654bf680154faa710d43fe4365a0868142f5c20e48c85e137a7a","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.25.28@sha256:a8834e285807654bf680154faa710d43fe4365a0868142f5c20e48c85e137a7a"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.28","digest":"sha256:93290f2393752252911bd7c39a047f776c0b53063575e7bde4e304962a9a61cb","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.28@sha256:93290f2393752252911bd7c39a047f776c0b53063575e7bde4e304962a9a61cb"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.28","digest":"sha256:844c18280f82cd1b06345eb2f4e91966b34185bfc51c9f237c3e022e848fb474","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.25.28@sha256:844c18280f82cd1b06345eb2f4e91966b34185bfc51c9f237c3e022e848fb474"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.0"},{"image":"ghcr.io/github/github-mcp-server:v1.0.3"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]} # ___ _ _ # / _ \ | | (_) @@ -188,24 +188,24 @@ jobs: run: | bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh" { - cat << 'GH_AW_PROMPT_f2e459e2875b7279_EOF' + cat << 'GH_AW_PROMPT_96593aee6729f976_EOF' - GH_AW_PROMPT_f2e459e2875b7279_EOF + GH_AW_PROMPT_96593aee6729f976_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md" cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md" cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md" cat "${RUNNER_TEMP}/gh-aw/prompts/repo_memory_prompt.md" cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md" - cat << 'GH_AW_PROMPT_f2e459e2875b7279_EOF' + cat << 'GH_AW_PROMPT_96593aee6729f976_EOF' Tools: create_pull_request, missing_tool, missing_data, noop - GH_AW_PROMPT_f2e459e2875b7279_EOF + GH_AW_PROMPT_96593aee6729f976_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_create_pull_request.md" - cat << 'GH_AW_PROMPT_f2e459e2875b7279_EOF' + cat << 'GH_AW_PROMPT_96593aee6729f976_EOF' - GH_AW_PROMPT_f2e459e2875b7279_EOF + GH_AW_PROMPT_96593aee6729f976_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md" - cat << 'GH_AW_PROMPT_f2e459e2875b7279_EOF' + cat << 'GH_AW_PROMPT_96593aee6729f976_EOF' The following GitHub context information is available for this workflow: {{#if __GH_AW_GITHUB_ACTOR__ }} @@ -234,14 +234,14 @@ jobs: {{/if}} - GH_AW_PROMPT_f2e459e2875b7279_EOF + GH_AW_PROMPT_96593aee6729f976_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md" - cat << 'GH_AW_PROMPT_f2e459e2875b7279_EOF' + cat << 'GH_AW_PROMPT_96593aee6729f976_EOF' {{#runtime-import .github/workflows/shared/community-attribution.md}} {{#runtime-import .github/workflows/shared/observability-otlp.md}} {{#runtime-import .github/workflows/daily-community-attribution.md}} - GH_AW_PROMPT_f2e459e2875b7279_EOF + GH_AW_PROMPT_96593aee6729f976_EOF } > "$GH_AW_PROMPT" - name: Interpolate variables and render templates uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 @@ -390,17 +390,17 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} name: Fetch community-labeled issues - run: "mkdir -p /tmp/gh-aw/community-data\n\n# The \"community\" label is the **primary attribution signal**: a maintainer\n# explicitly tagged the issue as community-authored, making it a strong and\n# intentional marker that does not rely on free-text heuristics.\necho \"Fetching issues with 'community' label (primary attribution signal)...\"\nif ! gh issue list \\\n --label \"community\" \\\n --state all \\\n --limit 500 \\\n --json number,title,author,labels,closedAt,createdAt,url,stateReason \\\n > /tmp/gh-aw/community-data/community_issues.json; then\n echo \"[]\" > /tmp/gh-aw/community-data/community_issues.json\nfi\n\nCOMMUNITY_COUNT=$(jq length \"/tmp/gh-aw/community-data/community_issues.json\")\necho \"✓ Fetched $COMMUNITY_COUNT community-labeled issues\"\necho \" Data: /tmp/gh-aw/community-data/community_issues.json\"\n" + run: "mkdir -p /tmp/gh-aw/agent/community-data\n\n# The \"community\" label is the **primary attribution signal**: a maintainer\n# explicitly tagged the issue as community-authored, making it a strong and\n# intentional marker that does not rely on free-text heuristics.\necho \"Fetching issues with 'community' label (primary attribution signal)...\"\nif ! gh issue list \\\n --label \"community\" \\\n --state all \\\n --limit 500 \\\n --json number,title,author,labels,closedAt,createdAt,url,stateReason \\\n > /tmp/gh-aw/agent/community-data/community_issues.json; then\n echo \"[]\" > /tmp/gh-aw/agent/community-data/community_issues.json\nfi\n\nCOMMUNITY_COUNT=$(jq length \"/tmp/gh-aw/agent/community-data/community_issues.json\")\necho \"✓ Fetched $COMMUNITY_COUNT community-labeled issues\"\necho \" Data: /tmp/gh-aw/agent/community-data/community_issues.json\"\n" - env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} name: Fetch PR data for attribution index - run: "mkdir -p /tmp/gh-aw/community-data\n\n# Fetch merged PRs from the last 90 days (wide enough to catch any recently attributed issue)\nSINCE=$(date -d '90 days ago' '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null \\\n || date -v-90d '+%Y-%m-%dT%H:%M:%SZ')\n\necho \"Fetching PRs merged since $SINCE...\"\ngh pr list \\\n --state merged \\\n --limit 500 \\\n --json number,title,author,mergedAt,url,body,closingIssuesReferences \\\n --jq \"[.[] | select(.mergedAt >= \\\"$SINCE\\\")]\" \\\n > /tmp/gh-aw/community-data/pull_requests.json \\\n || echo \"[]\" > /tmp/gh-aw/community-data/pull_requests.json\n\nPR_COUNT=$(jq length /tmp/gh-aw/community-data/pull_requests.json)\necho \"✓ Fetched $PR_COUNT merged PRs\"\n\n# Build closing references index: {issue_number: [pr_numbers]}\n# Use a nested reduce so the outer body always returns the accumulator,\n# even when closingIssuesReferences is empty (avoids jq setting acc to null).\njq '\n reduce .[] as $pr (\n {};\n reduce ($pr.closingIssuesReferences // [])[] as $issue (\n .;\n ($issue.number | tostring) as $key |\n .[$key] = (.[$key] // []) + [$pr.number]\n )\n )\n' /tmp/gh-aw/community-data/pull_requests.json \\\n > /tmp/gh-aw/community-data/closing_refs_by_issue.json 2>/dev/null \\\n || echo \"{}\" > /tmp/gh-aw/community-data/closing_refs_by_issue.json\n\nLINK_COUNT=$(jq 'keys | length' /tmp/gh-aw/community-data/closing_refs_by_issue.json)\necho \"✓ Built closing refs index: $LINK_COUNT issues with native GitHub close links\"\n\n# Find community issues closed within the PR lookback window (attribution candidates)\njq --arg since \"$SINCE\" \\\n '[.[] | select(.closedAt != null and .closedAt >= $since)]' \\\n /tmp/gh-aw/community-data/community_issues.json \\\n > /tmp/gh-aw/community-data/community_issues_closed_in_window.json 2>/dev/null \\\n || echo \"[]\" > /tmp/gh-aw/community-data/community_issues_closed_in_window.json\n\nCLOSED_COUNT=$(jq length /tmp/gh-aw/community-data/community_issues_closed_in_window.json)\necho \"✓ Found $CLOSED_COUNT community issues closed in the lookback window\"\n\necho \"\"\necho \"Data available in /tmp/gh-aw/community-data/:\"\necho \" community_issues.json — all community-labeled issues (includes stateReason)\"\necho \" pull_requests.json — merged PRs (last 90 days)\"\necho \" closing_refs_by_issue.json — native GitHub close links\"\necho \" community_issues_closed_in_window.json — closed during lookback\"\n" + run: "mkdir -p /tmp/gh-aw/agent/community-data\n\n# Fetch merged PRs from the last 90 days (wide enough to catch any recently attributed issue)\nSINCE=$(date -d '90 days ago' '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null \\\n || date -v-90d '+%Y-%m-%dT%H:%M:%SZ')\n\necho \"Fetching PRs merged since $SINCE...\"\ngh pr list \\\n --state merged \\\n --limit 500 \\\n --json number,title,author,mergedAt,url,body,closingIssuesReferences \\\n --jq \"[.[] | select(.mergedAt >= \\\"$SINCE\\\")]\" \\\n > /tmp/gh-aw/agent/community-data/pull_requests.json \\\n || echo \"[]\" > /tmp/gh-aw/agent/community-data/pull_requests.json\n\nPR_COUNT=$(jq length /tmp/gh-aw/agent/community-data/pull_requests.json)\necho \"✓ Fetched $PR_COUNT merged PRs\"\n\n# Build closing references index: {issue_number: [pr_numbers]}\n# Use a nested reduce so the outer body always returns the accumulator,\n# even when closingIssuesReferences is empty (avoids jq setting acc to null).\njq '\n reduce .[] as $pr (\n {};\n reduce ($pr.closingIssuesReferences // [])[] as $issue (\n .;\n ($issue.number | tostring) as $key |\n .[$key] = (.[$key] // []) + [$pr.number]\n )\n )\n' /tmp/gh-aw/agent/community-data/pull_requests.json \\\n > /tmp/gh-aw/agent/community-data/closing_refs_by_issue.json 2>/dev/null \\\n || echo \"{}\" > /tmp/gh-aw/agent/community-data/closing_refs_by_issue.json\n\nLINK_COUNT=$(jq 'keys | length' /tmp/gh-aw/agent/community-data/closing_refs_by_issue.json)\necho \"✓ Built closing refs index: $LINK_COUNT issues with native GitHub close links\"\n\n# Find community issues closed within the PR lookback window (attribution candidates)\njq --arg since \"$SINCE\" \\\n '[.[] | select(.closedAt != null and .closedAt >= $since)]' \\\n /tmp/gh-aw/agent/community-data/community_issues.json \\\n > /tmp/gh-aw/agent/community-data/community_issues_closed_in_window.json 2>/dev/null \\\n || echo \"[]\" > /tmp/gh-aw/agent/community-data/community_issues_closed_in_window.json\n\nCLOSED_COUNT=$(jq length /tmp/gh-aw/agent/community-data/community_issues_closed_in_window.json)\necho \"✓ Found $CLOSED_COUNT community issues closed in the lookback window\"\n\necho \"\"\necho \"Data available in /tmp/gh-aw/agent/community-data/:\"\necho \" community_issues.json — all community-labeled issues (includes stateReason)\"\necho \" pull_requests.json — merged PRs (last 90 days)\"\necho \" closing_refs_by_issue.json — native GitHub close links\"\necho \" community_issues_closed_in_window.json — closed during lookback\"\n" - env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} name: Compute deterministic attributions (Tier 0, 1, 2) - run: "# Tier 0: COMPLETED issues (direct contributions, no PR needed)\njq '[.[] | select(.stateReason == \"COMPLETED\") |\n . + {tier: 0, attribution_type: \"direct issue\", closing_prs: []}]' \\\n /tmp/gh-aw/community-data/community_issues.json \\\n > /tmp/gh-aw/community-data/tier0_attributed.json\n\nT0=$(jq length /tmp/gh-aw/community-data/tier0_attributed.json)\necho \"Tier 0 (direct issue — COMPLETED): $T0\"\n\n# Tier 1: native GitHub close references (exclude Tier 0 issues)\njq --slurpfile issues /tmp/gh-aw/community-data/community_issues.json \\\n --slurpfile t0 /tmp/gh-aw/community-data/tier0_attributed.json '\n ($t0[0] | map(.number) | map(tostring)) as $t0_keys |\n ($issues[0] | map(.number | tostring)) as $issue_keys |\n to_entries |\n map(select(\n .key as $k |\n ($issue_keys | index($k) != null) and\n ($t0_keys | index($k) == null)\n )) |\n map(.key as $k | .value as $prs |\n ($issues[0] | map(select(.number | tostring == $k))[0]) +\n {tier: 1, attribution_type: \"resolved by PR\", closing_prs: $prs}\n )\n' /tmp/gh-aw/community-data/closing_refs_by_issue.json \\\n > /tmp/gh-aw/community-data/tier1_attributed.json 2>/dev/null \\\n || echo \"[]\" > /tmp/gh-aw/community-data/tier1_attributed.json\n\nT1=$(jq length /tmp/gh-aw/community-data/tier1_attributed.json)\necho \"Tier 1 (native close refs): $T1\"\n\n# Tier 2: PR body keyword matching (exclude Tier 0 and Tier 1 issues)\nKW_ISSUES=$(jq -r '.[].body // \"\"' /tmp/gh-aw/community-data/pull_requests.json \\\n | grep -oP '(?i)(?:close[sd]?|fix(?:e[sd])?|resolve[sd]?)\\s*(?:github/gh-aw#|#)\\K[0-9]+' 2>/dev/null \\\n | sort -u | jq -R 'tonumber' | jq -s 'sort | unique' 2>/dev/null \\\n || echo \"[]\")\n\njq --argjson kw \"$KW_ISSUES\" \\\n --slurpfile t0 /tmp/gh-aw/community-data/tier0_attributed.json \\\n --slurpfile t1 /tmp/gh-aw/community-data/tier1_attributed.json '\n ($t0[0] | map(.number)) as $t0_nums |\n ($t1[0] | map(.number)) as $t1_nums |\n [.[] |\n select(\n .number as $n |\n ($kw | index($n) != null) and\n ($t0_nums | index($n) == null) and\n ($t1_nums | index($n) == null)\n ) |\n . + {tier: 2, attribution_type: \"resolved by PR\", closing_prs: []}\n ]\n' /tmp/gh-aw/community-data/community_issues.json \\\n > /tmp/gh-aw/community-data/tier2_attributed.json 2>/dev/null \\\n || echo \"[]\" > /tmp/gh-aw/community-data/tier2_attributed.json\n\nT2=$(jq length /tmp/gh-aw/community-data/tier2_attributed.json)\necho \"Tier 2 (PR body keywords): $T2\"\n\n# Combine Tier 0 + 1 + 2 into pre_attributed.json\njq -n \\\n --slurpfile t0 /tmp/gh-aw/community-data/tier0_attributed.json \\\n --slurpfile t1 /tmp/gh-aw/community-data/tier1_attributed.json \\\n --slurpfile t2 /tmp/gh-aw/community-data/tier2_attributed.json \\\n '$t0[0] + $t1[0] + $t2[0]' \\\n > /tmp/gh-aw/community-data/pre_attributed.json\n\nTOTAL=$(jq length /tmp/gh-aw/community-data/pre_attributed.json)\necho \"\"\necho \"Pre-attributed: $TOTAL issues (Tier 0: $T0, Tier 1: $T1, Tier 2: $T2)\"\n\n# Compute Tier 3+ candidates (closed in window, not yet pre-attributed)\njq --slurpfile pre /tmp/gh-aw/community-data/pre_attributed.json '\n ($pre[0] | map(.number)) as $attributed |\n [.[] | select(.number as $n | $attributed | index($n) == null)]\n' /tmp/gh-aw/community-data/community_issues_closed_in_window.json \\\n > /tmp/gh-aw/community-data/tier3_candidates.json 2>/dev/null \\\n || echo \"[]\" > /tmp/gh-aw/community-data/tier3_candidates.json\n\nT3=$(jq length /tmp/gh-aw/community-data/tier3_candidates.json)\necho \"Tier 3+ candidates (agent lookup needed): $T3\"\necho \"\"\necho \"Data available in /tmp/gh-aw/community-data/:\"\necho \" pre_attributed.json — Tier 0+1+2 confirmed attributions\"\necho \" tier3_candidates.json — issues needing Tier 3 agent lookup\"\n" + run: "# Tier 0: COMPLETED issues (direct contributions, no PR needed)\njq '[.[] | select(.stateReason == \"COMPLETED\") |\n . + {tier: 0, attribution_type: \"direct issue\", closing_prs: []}]' \\\n /tmp/gh-aw/agent/community-data/community_issues.json \\\n > /tmp/gh-aw/agent/community-data/tier0_attributed.json\n\nT0=$(jq length /tmp/gh-aw/agent/community-data/tier0_attributed.json)\necho \"Tier 0 (direct issue — COMPLETED): $T0\"\n\n# Tier 1: native GitHub close references (exclude Tier 0 issues)\njq --slurpfile issues /tmp/gh-aw/agent/community-data/community_issues.json \\\n --slurpfile t0 /tmp/gh-aw/agent/community-data/tier0_attributed.json '\n ($t0[0] | map(.number) | map(tostring)) as $t0_keys |\n ($issues[0] | map(.number | tostring)) as $issue_keys |\n to_entries |\n map(select(\n .key as $k |\n ($issue_keys | index($k) != null) and\n ($t0_keys | index($k) == null)\n )) |\n map(.key as $k | .value as $prs |\n ($issues[0] | map(select(.number | tostring == $k))[0]) +\n {tier: 1, attribution_type: \"resolved by PR\", closing_prs: $prs}\n )\n' /tmp/gh-aw/agent/community-data/closing_refs_by_issue.json \\\n > /tmp/gh-aw/agent/community-data/tier1_attributed.json 2>/dev/null \\\n || echo \"[]\" > /tmp/gh-aw/agent/community-data/tier1_attributed.json\n\nT1=$(jq length /tmp/gh-aw/agent/community-data/tier1_attributed.json)\necho \"Tier 1 (native close refs): $T1\"\n\n# Tier 2: PR body keyword matching (exclude Tier 0 and Tier 1 issues)\nKW_ISSUES=$(jq -r '.[].body // \"\"' /tmp/gh-aw/agent/community-data/pull_requests.json \\\n | grep -oP '(?i)(?:close[sd]?|fix(?:e[sd])?|resolve[sd]?)\\s*(?:github/gh-aw#|#)\\K[0-9]+' 2>/dev/null \\\n | sort -u | jq -R 'tonumber' | jq -s 'sort | unique' 2>/dev/null \\\n || echo \"[]\")\n\njq --argjson kw \"$KW_ISSUES\" \\\n --slurpfile t0 /tmp/gh-aw/agent/community-data/tier0_attributed.json \\\n --slurpfile t1 /tmp/gh-aw/agent/community-data/tier1_attributed.json '\n ($t0[0] | map(.number)) as $t0_nums |\n ($t1[0] | map(.number)) as $t1_nums |\n [.[] |\n select(\n .number as $n |\n ($kw | index($n) != null) and\n ($t0_nums | index($n) == null) and\n ($t1_nums | index($n) == null)\n ) |\n . + {tier: 2, attribution_type: \"resolved by PR\", closing_prs: []}\n ]\n' /tmp/gh-aw/agent/community-data/community_issues.json \\\n > /tmp/gh-aw/agent/community-data/tier2_attributed.json 2>/dev/null \\\n || echo \"[]\" > /tmp/gh-aw/agent/community-data/tier2_attributed.json\n\nT2=$(jq length /tmp/gh-aw/agent/community-data/tier2_attributed.json)\necho \"Tier 2 (PR body keywords): $T2\"\n\n# Combine Tier 0 + 1 + 2 into pre_attributed.json\njq -n \\\n --slurpfile t0 /tmp/gh-aw/agent/community-data/tier0_attributed.json \\\n --slurpfile t1 /tmp/gh-aw/agent/community-data/tier1_attributed.json \\\n --slurpfile t2 /tmp/gh-aw/agent/community-data/tier2_attributed.json \\\n '$t0[0] + $t1[0] + $t2[0]' \\\n > /tmp/gh-aw/agent/community-data/pre_attributed.json\n\nTOTAL=$(jq length /tmp/gh-aw/agent/community-data/pre_attributed.json)\necho \"\"\necho \"Pre-attributed: $TOTAL issues (Tier 0: $T0, Tier 1: $T1, Tier 2: $T2)\"\n\n# Compute Tier 3+ candidates (closed in window, not yet pre-attributed)\njq --slurpfile pre /tmp/gh-aw/agent/community-data/pre_attributed.json '\n ($pre[0] | map(.number)) as $attributed |\n [.[] | select(.number as $n | $attributed | index($n) == null)]\n' /tmp/gh-aw/agent/community-data/community_issues_closed_in_window.json \\\n > /tmp/gh-aw/agent/community-data/tier3_candidates.json 2>/dev/null \\\n || echo \"[]\" > /tmp/gh-aw/agent/community-data/tier3_candidates.json\n\nT3=$(jq length /tmp/gh-aw/agent/community-data/tier3_candidates.json)\necho \"Tier 3+ candidates (agent lookup needed): $T3\"\necho \"\"\necho \"Data available in /tmp/gh-aw/agent/community-data/:\"\necho \" pre_attributed.json — Tier 0+1+2 confirmed attributions\"\necho \" tier3_candidates.json — issues needing Tier 3 agent lookup\"\n" # Repo memory git-based storage configuration from frontmatter processed below - name: Clone wiki-memory branch (default) @@ -473,9 +473,9 @@ jobs: mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs - cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_49a932dfa30f315a_EOF' + cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_3dcbd7d1573dd4eb_EOF' {"create_pull_request":{"draft":true,"expires":24,"labels":["community","automation"],"max":1,"max_patch_size":1024,"protected_files":["package.json","bun.lockb","bunfig.toml","deno.json","deno.jsonc","deno.lock","global.json","NuGet.Config","Directory.Packages.props","mix.exs","mix.lock","go.mod","go.sum","stack.yaml","stack.yaml.lock","pom.xml","build.gradle","build.gradle.kts","settings.gradle","settings.gradle.kts","gradle.properties","package-lock.json","yarn.lock","pnpm-lock.yaml","npm-shrinkwrap.json","requirements.txt","Pipfile","Pipfile.lock","pyproject.toml","setup.py","setup.cfg","Gemfile","Gemfile.lock","uv.lock","CODEOWNERS","DESIGN.md","AGENTS.md","CLAUDE.md","GEMINI.md"],"protected_path_prefixes":[".github/",".agents/",".githooks/",".husky/"],"title_prefix":"[community] "},"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"push_repo_memory":{"memories":[{"dir":"/tmp/gh-aw/repo-memory/default","id":"default","max_file_count":100,"max_file_size":10240,"max_patch_size":10240}]},"report_incomplete":{}} - GH_AW_SAFE_OUTPUTS_CONFIG_49a932dfa30f315a_EOF + GH_AW_SAFE_OUTPUTS_CONFIG_3dcbd7d1573dd4eb_EOF - name: Write Safe Outputs Tools env: GH_AW_TOOLS_META_JSON: | @@ -682,7 +682,7 @@ jobs: mkdir -p /home/runner/.copilot GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - cat << GH_AW_MCP_CONFIG_8913abd3e50293c5_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" + cat << GH_AW_MCP_CONFIG_9945c28831dc1072_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" { "mcpServers": { "github": { @@ -729,7 +729,7 @@ jobs: } } } - GH_AW_MCP_CONFIG_8913abd3e50293c5_EOF + GH_AW_MCP_CONFIG_9945c28831dc1072_EOF - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/daily-community-attribution.md b/.github/workflows/daily-community-attribution.md index bb38bc5e649..ba352771030 100644 --- a/.github/workflows/daily-community-attribution.md +++ b/.github/workflows/daily-community-attribution.md @@ -57,7 +57,7 @@ steps: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - mkdir -p /tmp/gh-aw/community-data + mkdir -p /tmp/gh-aw/agent/community-data # Fetch merged PRs from the last 90 days (wide enough to catch any recently attributed issue) SINCE=$(date -d '90 days ago' '+%Y-%m-%dT%H:%M:%SZ' 2>/dev/null \ @@ -69,10 +69,10 @@ steps: --limit 500 \ --json number,title,author,mergedAt,url,body,closingIssuesReferences \ --jq "[.[] | select(.mergedAt >= \"$SINCE\")]" \ - > /tmp/gh-aw/community-data/pull_requests.json \ - || echo "[]" > /tmp/gh-aw/community-data/pull_requests.json + > /tmp/gh-aw/agent/community-data/pull_requests.json \ + || echo "[]" > /tmp/gh-aw/agent/community-data/pull_requests.json - PR_COUNT=$(jq length /tmp/gh-aw/community-data/pull_requests.json) + PR_COUNT=$(jq length /tmp/gh-aw/agent/community-data/pull_requests.json) echo "✓ Fetched $PR_COUNT merged PRs" # Build closing references index: {issue_number: [pr_numbers]} @@ -87,25 +87,25 @@ steps: .[$key] = (.[$key] // []) + [$pr.number] ) ) - ' /tmp/gh-aw/community-data/pull_requests.json \ - > /tmp/gh-aw/community-data/closing_refs_by_issue.json 2>/dev/null \ - || echo "{}" > /tmp/gh-aw/community-data/closing_refs_by_issue.json + ' /tmp/gh-aw/agent/community-data/pull_requests.json \ + > /tmp/gh-aw/agent/community-data/closing_refs_by_issue.json 2>/dev/null \ + || echo "{}" > /tmp/gh-aw/agent/community-data/closing_refs_by_issue.json - LINK_COUNT=$(jq 'keys | length' /tmp/gh-aw/community-data/closing_refs_by_issue.json) + LINK_COUNT=$(jq 'keys | length' /tmp/gh-aw/agent/community-data/closing_refs_by_issue.json) echo "✓ Built closing refs index: $LINK_COUNT issues with native GitHub close links" # Find community issues closed within the PR lookback window (attribution candidates) jq --arg since "$SINCE" \ '[.[] | select(.closedAt != null and .closedAt >= $since)]' \ - /tmp/gh-aw/community-data/community_issues.json \ - > /tmp/gh-aw/community-data/community_issues_closed_in_window.json 2>/dev/null \ - || echo "[]" > /tmp/gh-aw/community-data/community_issues_closed_in_window.json + /tmp/gh-aw/agent/community-data/community_issues.json \ + > /tmp/gh-aw/agent/community-data/community_issues_closed_in_window.json 2>/dev/null \ + || echo "[]" > /tmp/gh-aw/agent/community-data/community_issues_closed_in_window.json - CLOSED_COUNT=$(jq length /tmp/gh-aw/community-data/community_issues_closed_in_window.json) + CLOSED_COUNT=$(jq length /tmp/gh-aw/agent/community-data/community_issues_closed_in_window.json) echo "✓ Found $CLOSED_COUNT community issues closed in the lookback window" echo "" - echo "Data available in /tmp/gh-aw/community-data/:" + echo "Data available in /tmp/gh-aw/agent/community-data/:" echo " community_issues.json — all community-labeled issues (includes stateReason)" echo " pull_requests.json — merged PRs (last 90 days)" echo " closing_refs_by_issue.json — native GitHub close links" @@ -119,15 +119,15 @@ steps: # Tier 0: COMPLETED issues (direct contributions, no PR needed) jq '[.[] | select(.stateReason == "COMPLETED") | . + {tier: 0, attribution_type: "direct issue", closing_prs: []}]' \ - /tmp/gh-aw/community-data/community_issues.json \ - > /tmp/gh-aw/community-data/tier0_attributed.json + /tmp/gh-aw/agent/community-data/community_issues.json \ + > /tmp/gh-aw/agent/community-data/tier0_attributed.json - T0=$(jq length /tmp/gh-aw/community-data/tier0_attributed.json) + T0=$(jq length /tmp/gh-aw/agent/community-data/tier0_attributed.json) echo "Tier 0 (direct issue — COMPLETED): $T0" # Tier 1: native GitHub close references (exclude Tier 0 issues) - jq --slurpfile issues /tmp/gh-aw/community-data/community_issues.json \ - --slurpfile t0 /tmp/gh-aw/community-data/tier0_attributed.json ' + jq --slurpfile issues /tmp/gh-aw/agent/community-data/community_issues.json \ + --slurpfile t0 /tmp/gh-aw/agent/community-data/tier0_attributed.json ' ($t0[0] | map(.number) | map(tostring)) as $t0_keys | ($issues[0] | map(.number | tostring)) as $issue_keys | to_entries | @@ -140,22 +140,22 @@ steps: ($issues[0] | map(select(.number | tostring == $k))[0]) + {tier: 1, attribution_type: "resolved by PR", closing_prs: $prs} ) - ' /tmp/gh-aw/community-data/closing_refs_by_issue.json \ - > /tmp/gh-aw/community-data/tier1_attributed.json 2>/dev/null \ - || echo "[]" > /tmp/gh-aw/community-data/tier1_attributed.json + ' /tmp/gh-aw/agent/community-data/closing_refs_by_issue.json \ + > /tmp/gh-aw/agent/community-data/tier1_attributed.json 2>/dev/null \ + || echo "[]" > /tmp/gh-aw/agent/community-data/tier1_attributed.json - T1=$(jq length /tmp/gh-aw/community-data/tier1_attributed.json) + T1=$(jq length /tmp/gh-aw/agent/community-data/tier1_attributed.json) echo "Tier 1 (native close refs): $T1" # Tier 2: PR body keyword matching (exclude Tier 0 and Tier 1 issues) - KW_ISSUES=$(jq -r '.[].body // ""' /tmp/gh-aw/community-data/pull_requests.json \ + KW_ISSUES=$(jq -r '.[].body // ""' /tmp/gh-aw/agent/community-data/pull_requests.json \ | grep -oP '(?i)(?:close[sd]?|fix(?:e[sd])?|resolve[sd]?)\s*(?:github/gh-aw#|#)\K[0-9]+' 2>/dev/null \ | sort -u | jq -R 'tonumber' | jq -s 'sort | unique' 2>/dev/null \ || echo "[]") jq --argjson kw "$KW_ISSUES" \ - --slurpfile t0 /tmp/gh-aw/community-data/tier0_attributed.json \ - --slurpfile t1 /tmp/gh-aw/community-data/tier1_attributed.json ' + --slurpfile t0 /tmp/gh-aw/agent/community-data/tier0_attributed.json \ + --slurpfile t1 /tmp/gh-aw/agent/community-data/tier1_attributed.json ' ($t0[0] | map(.number)) as $t0_nums | ($t1[0] | map(.number)) as $t1_nums | [.[] | @@ -167,37 +167,37 @@ steps: ) | . + {tier: 2, attribution_type: "resolved by PR", closing_prs: []} ] - ' /tmp/gh-aw/community-data/community_issues.json \ - > /tmp/gh-aw/community-data/tier2_attributed.json 2>/dev/null \ - || echo "[]" > /tmp/gh-aw/community-data/tier2_attributed.json + ' /tmp/gh-aw/agent/community-data/community_issues.json \ + > /tmp/gh-aw/agent/community-data/tier2_attributed.json 2>/dev/null \ + || echo "[]" > /tmp/gh-aw/agent/community-data/tier2_attributed.json - T2=$(jq length /tmp/gh-aw/community-data/tier2_attributed.json) + T2=$(jq length /tmp/gh-aw/agent/community-data/tier2_attributed.json) echo "Tier 2 (PR body keywords): $T2" # Combine Tier 0 + 1 + 2 into pre_attributed.json jq -n \ - --slurpfile t0 /tmp/gh-aw/community-data/tier0_attributed.json \ - --slurpfile t1 /tmp/gh-aw/community-data/tier1_attributed.json \ - --slurpfile t2 /tmp/gh-aw/community-data/tier2_attributed.json \ + --slurpfile t0 /tmp/gh-aw/agent/community-data/tier0_attributed.json \ + --slurpfile t1 /tmp/gh-aw/agent/community-data/tier1_attributed.json \ + --slurpfile t2 /tmp/gh-aw/agent/community-data/tier2_attributed.json \ '$t0[0] + $t1[0] + $t2[0]' \ - > /tmp/gh-aw/community-data/pre_attributed.json + > /tmp/gh-aw/agent/community-data/pre_attributed.json - TOTAL=$(jq length /tmp/gh-aw/community-data/pre_attributed.json) + TOTAL=$(jq length /tmp/gh-aw/agent/community-data/pre_attributed.json) echo "" echo "Pre-attributed: $TOTAL issues (Tier 0: $T0, Tier 1: $T1, Tier 2: $T2)" # Compute Tier 3+ candidates (closed in window, not yet pre-attributed) - jq --slurpfile pre /tmp/gh-aw/community-data/pre_attributed.json ' + jq --slurpfile pre /tmp/gh-aw/agent/community-data/pre_attributed.json ' ($pre[0] | map(.number)) as $attributed | [.[] | select(.number as $n | $attributed | index($n) == null)] - ' /tmp/gh-aw/community-data/community_issues_closed_in_window.json \ - > /tmp/gh-aw/community-data/tier3_candidates.json 2>/dev/null \ - || echo "[]" > /tmp/gh-aw/community-data/tier3_candidates.json + ' /tmp/gh-aw/agent/community-data/community_issues_closed_in_window.json \ + > /tmp/gh-aw/agent/community-data/tier3_candidates.json 2>/dev/null \ + || echo "[]" > /tmp/gh-aw/agent/community-data/tier3_candidates.json - T3=$(jq length /tmp/gh-aw/community-data/tier3_candidates.json) + T3=$(jq length /tmp/gh-aw/agent/community-data/tier3_candidates.json) echo "Tier 3+ candidates (agent lookup needed): $T3" echo "" - echo "Data available in /tmp/gh-aw/community-data/:" + echo "Data available in /tmp/gh-aw/agent/community-data/:" echo " pre_attributed.json — Tier 0+1+2 confirmed attributions" echo " tier3_candidates.json — issues needing Tier 3 agent lookup" @@ -221,22 +221,22 @@ and opens a PR for review. ## Pre-fetched Data -All data is in `/tmp/gh-aw/community-data/`: +All data is in `/tmp/gh-aw/agent/community-data/`: ```bash # Tier 0+1+2 are already computed — start here: -cat /tmp/gh-aw/community-data/pre_attributed.json | \ +cat /tmp/gh-aw/agent/community-data/pre_attributed.json | \ jq -r '.[] | "- #\(.number) [Tier \(.tier)] \(.attribution_type) — \(.title) by @\(.author.login)"' # Issues still needing Tier 3 agent lookup: -cat /tmp/gh-aw/community-data/tier3_candidates.json | \ +cat /tmp/gh-aw/agent/community-data/tier3_candidates.json | \ jq -r '.[] | "- #\(.number): \(.title) by @\(.author.login) (closed: \(.closedAt), stateReason: \(.stateReason // "null"))"' # View closing reference index -cat /tmp/gh-aw/community-data/closing_refs_by_issue.json | jq +cat /tmp/gh-aw/agent/community-data/closing_refs_by_issue.json | jq # View current README -head -80 /tmp/gh-aw/community-data/README_current.md +head -80 /tmp/gh-aw/agent/community-data/README_current.md # View existing wiki page (if any) cat /tmp/gh-aw/repo-memory-default/Community-Contributors.md 2>/dev/null || echo "(wiki page does not exist yet)" diff --git a/.github/workflows/release.lock.yml b/.github/workflows/release.lock.yml index ba6a0bbf03e..7e1793b118f 100644 --- a/.github/workflows/release.lock.yml +++ b/.github/workflows/release.lock.yml @@ -1,4 +1,4 @@ -# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"8b0a55c4b5372c5729715d9dcbcfcc9c759f31aa7aebeb6a9606a71ccca3594e","strict":true,"agent_id":"copilot"} +# gh-aw-metadata: {"schema_version":"v3","frontmatter_hash":"27e4c9e9fba5eaf785acfef09023fdfd48dc71ff69434c6b693a849e26d0463f","strict":true,"agent_id":"copilot"} # gh-aw-manifest: {"version":1,"secrets":["COPILOT_GITHUB_TOKEN","GH_AW_GITHUB_MCP_SERVER_TOKEN","GH_AW_GITHUB_TOKEN","GITHUB_TOKEN"],"actions":[{"repo":"actions/checkout","sha":"de0fac2e4500dabe0009e67214ff5f5447ce83dd","version":"v6.0.2"},{"repo":"actions/download-artifact","sha":"3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c","version":"v8.0.1"},{"repo":"actions/github-script","sha":"373c709c69115d41ff229c7e5df9f8788daa9553","version":"v9"},{"repo":"actions/setup-go","sha":"4a3601121dd01d1626a1e23e37211e3254c1c06c","version":"v6.4.0"},{"repo":"actions/upload-artifact","sha":"043fb46d1a93c77aae656e7c1c64a875d1fc6a0a","version":"v7.0.1"},{"repo":"anchore/sbom-action","sha":"e22c389904149dbc22b58101806040fa8d37a610","version":"v0.24.0"},{"repo":"docker/build-push-action","sha":"bcafcacb16a39f128d818304e6c9c0c18556b85f","version":"v7.1.0"},{"repo":"docker/login-action","sha":"4907a6ddec9925e35a0a9e82d7399ccc52663121","version":"v4.1.0"},{"repo":"docker/metadata-action","sha":"030e881283bb7a6894de51c315a6bfe6a94e05cf","version":"v6"},{"repo":"docker/setup-buildx-action","sha":"4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd","version":"v4"}],"containers":[{"image":"ghcr.io/github/gh-aw-firewall/agent:0.25.28","digest":"sha256:a8834e285807654bf680154faa710d43fe4365a0868142f5c20e48c85e137a7a","pinned_image":"ghcr.io/github/gh-aw-firewall/agent:0.25.28@sha256:a8834e285807654bf680154faa710d43fe4365a0868142f5c20e48c85e137a7a"},{"image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.28","digest":"sha256:93290f2393752252911bd7c39a047f776c0b53063575e7bde4e304962a9a61cb","pinned_image":"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.28@sha256:93290f2393752252911bd7c39a047f776c0b53063575e7bde4e304962a9a61cb"},{"image":"ghcr.io/github/gh-aw-firewall/squid:0.25.28","digest":"sha256:844c18280f82cd1b06345eb2f4e91966b34185bfc51c9f237c3e022e848fb474","pinned_image":"ghcr.io/github/gh-aw-firewall/squid:0.25.28@sha256:844c18280f82cd1b06345eb2f4e91966b34185bfc51c9f237c3e022e848fb474"},{"image":"ghcr.io/github/gh-aw-mcpg:v0.3.0"},{"image":"ghcr.io/github/github-mcp-server:v1.0.3"},{"image":"node:lts-alpine","digest":"sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f","pinned_image":"node:lts-alpine@sha256:d1b3b4da11eefd5941e7f0b9cf17783fc99d9c6fc34884a665f40a06dbdfc94f"}]} # ___ _ _ # / _ \ | | (_) @@ -196,20 +196,20 @@ jobs: run: | bash "${RUNNER_TEMP}/gh-aw/actions/create_prompt_first.sh" { - cat << 'GH_AW_PROMPT_9d3037e902ef557d_EOF' + cat << 'GH_AW_PROMPT_8387ae72db38c810_EOF' - GH_AW_PROMPT_9d3037e902ef557d_EOF + GH_AW_PROMPT_8387ae72db38c810_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/xpia.md" cat "${RUNNER_TEMP}/gh-aw/prompts/temp_folder_prompt.md" cat "${RUNNER_TEMP}/gh-aw/prompts/markdown.md" cat "${RUNNER_TEMP}/gh-aw/prompts/safe_outputs_prompt.md" - cat << 'GH_AW_PROMPT_9d3037e902ef557d_EOF' + cat << 'GH_AW_PROMPT_8387ae72db38c810_EOF' Tools: update_release, missing_tool, missing_data, noop - GH_AW_PROMPT_9d3037e902ef557d_EOF + GH_AW_PROMPT_8387ae72db38c810_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/mcp_cli_tools_prompt.md" - cat << 'GH_AW_PROMPT_9d3037e902ef557d_EOF' + cat << 'GH_AW_PROMPT_8387ae72db38c810_EOF' The following GitHub context information is available for this workflow: {{#if __GH_AW_GITHUB_ACTOR__ }} @@ -238,13 +238,13 @@ jobs: {{/if}} - GH_AW_PROMPT_9d3037e902ef557d_EOF + GH_AW_PROMPT_8387ae72db38c810_EOF cat "${RUNNER_TEMP}/gh-aw/prompts/github_mcp_tools_with_safeoutputs_prompt.md" - cat << 'GH_AW_PROMPT_9d3037e902ef557d_EOF' + cat << 'GH_AW_PROMPT_8387ae72db38c810_EOF' {{#runtime-import .github/workflows/shared/community-attribution.md}} {{#runtime-import .github/workflows/release.md}} - GH_AW_PROMPT_9d3037e902ef557d_EOF + GH_AW_PROMPT_8387ae72db38c810_EOF } > "$GH_AW_PROMPT" - name: Interpolate variables and render templates uses: actions/github-script@373c709c69115d41ff229c7e5df9f8788daa9553 # v9 @@ -383,7 +383,7 @@ jobs: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} name: Fetch community-labeled issues - run: "mkdir -p /tmp/gh-aw/community-data\n\n# The \"community\" label is the **primary attribution signal**: a maintainer\n# explicitly tagged the issue as community-authored, making it a strong and\n# intentional marker that does not rely on free-text heuristics.\necho \"Fetching issues with 'community' label (primary attribution signal)...\"\nif ! gh issue list \\\n --label \"community\" \\\n --state all \\\n --limit 500 \\\n --json number,title,author,labels,closedAt,createdAt,url,stateReason \\\n > /tmp/gh-aw/community-data/community_issues.json; then\n echo \"[]\" > /tmp/gh-aw/community-data/community_issues.json\nfi\n\nCOMMUNITY_COUNT=$(jq length \"/tmp/gh-aw/community-data/community_issues.json\")\necho \"✓ Fetched $COMMUNITY_COUNT community-labeled issues\"\necho \" Data: /tmp/gh-aw/community-data/community_issues.json\"\n" + run: "mkdir -p /tmp/gh-aw/agent/community-data\n\n# The \"community\" label is the **primary attribution signal**: a maintainer\n# explicitly tagged the issue as community-authored, making it a strong and\n# intentional marker that does not rely on free-text heuristics.\necho \"Fetching issues with 'community' label (primary attribution signal)...\"\nif ! gh issue list \\\n --label \"community\" \\\n --state all \\\n --limit 500 \\\n --json number,title,author,labels,closedAt,createdAt,url,stateReason \\\n > /tmp/gh-aw/agent/community-data/community_issues.json; then\n echo \"[]\" > /tmp/gh-aw/agent/community-data/community_issues.json\nfi\n\nCOMMUNITY_COUNT=$(jq length \"/tmp/gh-aw/agent/community-data/community_issues.json\")\necho \"✓ Fetched $COMMUNITY_COUNT community-labeled issues\"\necho \" Data: /tmp/gh-aw/agent/community-data/community_issues.json\"\n" - env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} RELEASE_ID: ${{ needs.release.outputs.release_id }} @@ -452,9 +452,9 @@ jobs: mkdir -p "${RUNNER_TEMP}/gh-aw/safeoutputs" mkdir -p /tmp/gh-aw/safeoutputs mkdir -p /tmp/gh-aw/mcp-logs/safeoutputs - cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_0476ffd20d54fc45_EOF' + cat > "${RUNNER_TEMP}/gh-aw/safeoutputs/config.json" << 'GH_AW_SAFE_OUTPUTS_CONFIG_0117f2c61880e7da_EOF' {"create_report_incomplete_issue":{},"missing_data":{},"missing_tool":{},"noop":{"max":1,"report-as-issue":"true"},"report_incomplete":{},"update_release":{"max":1}} - GH_AW_SAFE_OUTPUTS_CONFIG_0476ffd20d54fc45_EOF + GH_AW_SAFE_OUTPUTS_CONFIG_0117f2c61880e7da_EOF - name: Write Safe Outputs Tools env: GH_AW_TOOLS_META_JSON: | @@ -645,7 +645,7 @@ jobs: mkdir -p /home/runner/.copilot GH_AW_NODE=$(which node 2>/dev/null || command -v node 2>/dev/null || echo node) - cat << GH_AW_MCP_CONFIG_409e12da1644f0d8_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" + cat << GH_AW_MCP_CONFIG_9d8d15e729be16fd_EOF | "$GH_AW_NODE" "${RUNNER_TEMP}/gh-aw/actions/start_mcp_gateway.cjs" { "mcpServers": { "github": { @@ -686,7 +686,7 @@ jobs: "payloadDir": "${MCP_GATEWAY_PAYLOAD_DIR}" } } - GH_AW_MCP_CONFIG_409e12da1644f0d8_EOF + GH_AW_MCP_CONFIG_9d8d15e729be16fd_EOF - name: Mount MCP servers as CLIs id: mount-mcp-clis continue-on-error: true diff --git a/.github/workflows/shared/community-attribution.md b/.github/workflows/shared/community-attribution.md index 6348aaea317..f410ad8b7fb 100644 --- a/.github/workflows/shared/community-attribution.md +++ b/.github/workflows/shared/community-attribution.md @@ -15,7 +15,7 @@ steps: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | - mkdir -p /tmp/gh-aw/community-data + mkdir -p /tmp/gh-aw/agent/community-data # The "community" label is the **primary attribution signal**: a maintainer # explicitly tagged the issue as community-authored, making it a strong and @@ -26,13 +26,13 @@ steps: --state all \ --limit 500 \ --json number,title,author,labels,closedAt,createdAt,url,stateReason \ - > /tmp/gh-aw/community-data/community_issues.json; then - echo "[]" > /tmp/gh-aw/community-data/community_issues.json + > /tmp/gh-aw/agent/community-data/community_issues.json; then + echo "[]" > /tmp/gh-aw/agent/community-data/community_issues.json fi - COMMUNITY_COUNT=$(jq length "/tmp/gh-aw/community-data/community_issues.json") + COMMUNITY_COUNT=$(jq length "/tmp/gh-aw/agent/community-data/community_issues.json") echo "✓ Fetched $COMMUNITY_COUNT community-labeled issues" - echo " Data: /tmp/gh-aw/community-data/community_issues.json" + echo " Data: /tmp/gh-aw/agent/community-data/community_issues.json" --- ## Community Attribution Strategy @@ -41,11 +41,11 @@ The **`community` label** is the primary attribution signal. It is applied by maintainers to explicitly mark issues as community-authored — a strong, intentional indicator that does not rely on free-text heuristics. -Pre-fetched data is available at `/tmp/gh-aw/community-data/`: +Pre-fetched data is available at `/tmp/gh-aw/agent/community-data/`: ```bash # List all community-labeled issues -cat /tmp/gh-aw/community-data/community_issues.json \ +cat /tmp/gh-aw/agent/community-data/community_issues.json \ | jq -r '.[] | "- #\(.number): \(.title) by @\(.author.login) (closed: \(.closedAt // "open"))"' ``` @@ -64,7 +64,7 @@ is closed as `COMPLETED`. This is the strongest possible attribution signal. ```bash # List all community issues closed as COMPLETED (direct contributions) -cat /tmp/gh-aw/community-data/community_issues.json \ +cat /tmp/gh-aw/agent/community-data/community_issues.json \ | jq -r '.[] | select(.stateReason == "COMPLETED") | "- #\(.number): \(.title) by @\(.author.login) (closed: \(.closedAt))"' ``` @@ -80,13 +80,13 @@ native close-with-keyword feature). This is the strongest PR-linkage signal because it does not depend on free-text conventions. ```bash -COMMUNITY_NUMBERS=$(jq '[.[].number]' /tmp/gh-aw/community-data/community_issues.json) +COMMUNITY_NUMBERS=$(jq '[.[].number]' /tmp/gh-aw/agent/community-data/community_issues.json) jq --argjson community "$COMMUNITY_NUMBERS" \ 'to_entries | map(select((.key | tonumber) as $n | $community | any(. == $n))) | from_entries' \ - /tmp/gh-aw/community-data/closing_refs_by_issue.json + /tmp/gh-aw/agent/community-data/closing_refs_by_issue.json ``` Record every matched issue as **confirmed** attribution. @@ -98,7 +98,7 @@ closing keywords. Both bare (`#123`) and fully-qualified (`org/repo#123`) forms are supported. ```bash -jq -r '.[].body // ""' /tmp/gh-aw/community-data/pull_requests.json \ +jq -r '.[].body // ""' /tmp/gh-aw/agent/community-data/pull_requests.json \ | grep -oP '(?i)(?:close[sd]?|fix(?:e[sd])?|resolve[sd]?)\s*(?:github/gh-aw#|#)\K[0-9]+' \ | sort -u ``` @@ -129,7 +129,7 @@ make the final call. ```bash # Issues in the window that are NOT COMPLETED (Tier 0) and not matched by PR tiers -cat /tmp/gh-aw/community-data/community_issues_closed_in_window.json | \ +cat /tmp/gh-aw/agent/community-data/community_issues_closed_in_window.json | \ jq '[.[] | select(.stateReason != "COMPLETED")] | length' ```