Commit d688a4a
fix: align token workflows with gh-aw logs --json schema and add shared log caching (#24395)
* fix: align token workflows with gh-aw logs --json schema
gh aw logs --json returns an object with a .runs array (not a bare
array), and run objects use snake_case field names. All 4 token
workflows (copilot/claude analyzers and optimizers) assumed a bare
array with camelCase fields, causing jq errors like:
Cannot index array with string "workflowName"
Changes:
- Extract .runs array from JSON object before processing
- Replace camelCase fields with snake_case (workflow_name,
token_usage, database_id, created_at)
- Replace non-existent estimatedCost with 0 placeholder
- Update documentation sections with correct field names
Co-authored-by: Copilot <[email protected]>
* Update .github/workflows/copilot-token-optimizer.md
Co-authored-by: Copilot <[email protected]>
* Update .github/workflows/claude-token-optimizer.md
Co-authored-by: Copilot <[email protected]>
* fix: recompile lock files after sort_by addition
Recompile copilot-token-optimizer and claude-token-optimizer lock
files to match the sort_by(.workflow_name) additions made via UI.
Co-authored-by: Copilot <[email protected]>
* feat: extract shared token-logs-fetch workflow and cache logs to avoid rate-limiting
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/37b38e9c-5938-4c6f-a082-9bc64b2a8b7b
Co-authored-by: pelikhan <[email protected]>
---------
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: pelikhan <[email protected]>1 parent 5a19c28 commit d688a4a
File tree
10 files changed
+1526
-122
lines changed- .github/workflows
10 files changed
+1526
-122
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
73 | 105 | | |
74 | 106 | | |
75 | 107 | | |
| |||
80 | 112 | | |
81 | 113 | | |
82 | 114 | | |
83 | | - | |
| 115 | + | |
| 116 | + | |
84 | 117 | | |
85 | | - | |
86 | | - | |
87 | | - | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
88 | 121 | | |
89 | | - | |
90 | | - | |
91 | | - | |
92 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
93 | 126 | | |
94 | 127 | | |
95 | 128 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments