Skip to content

Commit 6582cfe

Browse files
authored
Delete daily-audit-base.md and add create-issue safe output to copilot-token-audit
2 parents bc5ab40 + fcf7d6e commit 6582cfe

4 files changed

Lines changed: 82 additions & 35 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
- name: Set up gh-aw CLI
1515
uses: github/gh-aw-actions/setup-cli@f8495a686e66770ae977f82732f34d7340ee42a4 # v0.71.4
1616
with:
17-
gh_token: ${{ secrets.GITHUB_TOKEN }}
17+
version: v0.71.4
18+
github-token: ${{ secrets.GITHUB_TOKEN }}
1819

1920
- name: Compile workflows
2021
run: gh aw compile --dir workflows
@@ -27,9 +28,17 @@ jobs:
2728
- name: Set up gh-aw CLI
2829
uses: github/gh-aw-actions/setup-cli@f8495a686e66770ae977f82732f34d7340ee42a4 # v0.71.4
2930
with:
30-
gh_token: ${{ secrets.GITHUB_TOKEN }}
31+
version: v0.71.4
32+
github-token: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- name: Initialize target repository
35+
run: |
36+
TARGET_REPO=$(mktemp -d)
37+
echo "TARGET_REPO=$TARGET_REPO" >> "$GITHUB_ENV"
38+
git init "$TARGET_REPO"
3139
3240
- name: Add workflows
41+
working-directory: ${{ env.TARGET_REPO }}
3342
run: gh aw add githubnext/agentic-ops/copilot-token-audit githubnext/agentic-ops/copilot-token-optimizer
3443
env:
3544
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

‎workflows/copilot-token-audit.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,14 @@ steps:
4646
echo "❌ No log data downloaded (exit code $LOGS_EXIT)"
4747
echo '{"runs":[],"summary":{}}' > /tmp/gh-aw/token-audit/copilot-logs.json
4848
fi
49+
safe-outputs:
50+
create-issue:
51+
close-older-issues: true
52+
expires: 1w
53+
labels: [agentic-workflows, agentic-ops]
54+
title-prefix: "[aw-ops] "
4955
timeout-minutes: 25
5056
imports:
51-
- uses: shared/daily-audit-base.md
52-
with:
53-
title-prefix: "[copilot-token-audit] "
54-
- uses: shared/mcp/gh-aw.md
5557
- shared/python-dataviz.md
5658
---
5759

‎workflows/shared/daily-audit-base.md‎

Lines changed: 0 additions & 29 deletions
This file was deleted.

‎workflows/shared/reporting.md‎

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
---
2+
# Reporting Shared Component
3+
# Provides common issue-reporting conventions for agentic workflows.
4+
#
5+
# Usage:
6+
# imports:
7+
# - shared/reporting.md
8+
#
9+
# This import provides:
10+
# - Standard formatting guidelines for issues and discussions
11+
# - Common markdown templates for tables, summaries, and recommendations
12+
13+
safe-outputs:
14+
create-issue:
15+
close-older-issues: true
16+
expires: 7d
17+
---
18+
19+
# Reporting Guidelines
20+
21+
Use the following conventions when generating issues, discussions, or step summaries.
22+
23+
## Issue Structure
24+
25+
Every generated issue should include:
26+
27+
1. **Executive Summary** — two-to-three sentence overview of findings.
28+
2. **Data Table** — key metrics in a compact markdown table.
29+
3. **Recommendations** — ranked list with estimated impact and concrete action.
30+
4. **Caveats** — sampling limits, missing data, or edge cases that affect confidence.
31+
32+
Use `<details>` blocks for long supporting tables to keep the top-level view concise.
33+
34+
## Markdown Conventions
35+
36+
- Use `**bold**` for metric names and important values.
37+
- Format large numbers with commas (e.g., `1,234,567`).
38+
- Format costs as `$X.XX` (two decimal places).
39+
- Use emoji sparingly: ✅ success, ⚠️ warning, ❌ failure, 📊 data, 💡 insight.
40+
- Link to relevant runs, PRs, or issues where possible.
41+
42+
## Table Template
43+
44+
```markdown
45+
| Metric | Value | Notes |
46+
|---|---|---|
47+
| Total runs | N | Last N days |
48+
| Total tokens | N | Formatted with commas |
49+
| Total cost | $X.XX | USD |
50+
| Avg tokens/run | N | |
51+
```
52+
53+
## Recommendations Template
54+
55+
```markdown
56+
### Recommendations
57+
58+
1. **[Title]** — estimated savings: ~N tokens/run
59+
- **Action**: ...
60+
- **Evidence**: ...
61+
62+
2. **[Title]** — estimated savings: ~N tokens/run
63+
- **Action**: ...
64+
- **Evidence**: ...
65+
```

0 commit comments

Comments
 (0)