Skip to content

Commit b7d42a7

Browse files
lpcoxCopilot
andauthored
Update .github/workflows/token-usage-analyzer.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent ad8f657 commit b7d42a7

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/token-usage-analyzer.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,13 @@ Use `gh run list` via bash to find completed agentic workflow runs from the past
7070

7171
Use bash to run:
7272
```bash
73-
gh run list --repo "$GITHUB_REPOSITORY" --limit 50 --json databaseId,name,status,conclusion,createdAt,workflowName --jq '[.[] | select(.conclusion == "success" or .conclusion == "failure")]'
73+
# Find runs from the last 24 hours
74+
CUTOFF="$(date -u -Iseconds -d '24 hours ago')"
75+
76+
gh run list --repo "$GITHUB_REPOSITORY" --limit 50 \
77+
--created ">=$CUTOFF" \
78+
--json databaseId,name,status,conclusion,createdAt,workflowName \
79+
--jq '[.[] | select(.conclusion == "success" or .conclusion == "failure")]'
7480
```
7581

7682
### Step 2: Download and Parse Token Usage Data

0 commit comments

Comments
 (0)