Skip to content

Commit a057dbd

Browse files
authored
Update go-fan workflow to create issues instead of discussions (#46)
1 parent b688502 commit a057dbd

3 files changed

Lines changed: 193 additions & 28 deletions

File tree

Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
#
2+
# ___ _ _
3+
# / _ \ | | (_)
4+
# | |_| | __ _ ___ _ __ | |_ _ ___
5+
# | _ |/ _` |/ _ \ '_ \| __| |/ __|
6+
# | | | | (_| | __/ | | | |_| | (__
7+
# \_| |_/\__, |\___|_| |_|\__|_|\___|
8+
# __/ |
9+
# _ _ |___/
10+
# | | | | / _| |
11+
# | | | | ___ _ __ _ __| |_| | _____ ____
12+
# | |/\| |/ _ \ '__| |/ /| _| |/ _ \ \ /\ / / ___|
13+
# \ /\ / (_) | | | | ( | | | | (_) \ V V /\__ \
14+
# \/ \/ \___/|_| |_|\_\|_| |_|\___/ \_/\_/ |___/
15+
#
16+
# This file was automatically generated by pkg/workflow/maintenance_workflow.go (v0.35.1). DO NOT EDIT.
17+
#
18+
# To regenerate this workflow, run:
19+
# gh aw compile
20+
# For more information: https://github.com/githubnext/gh-aw/blob/main/.github/aw/github-agentic-workflows.md
21+
#
22+
# Alternative regeneration methods:
23+
# make recompile
24+
#
25+
# Or use the gh-aw CLI directly:
26+
# ./gh-aw compile --validate --verbose
27+
#
28+
# The workflow is generated when any workflow uses the 'expires' field
29+
# in create-discussions or create-issues safe-outputs configuration.
30+
# Schedule frequency is automatically determined by the shortest expiration time.
31+
#
32+
name: Agentics Maintenance
33+
34+
on:
35+
schedule:
36+
- cron: "37 */2 * * *" # Every 2 hours (based on minimum expires: 1 days)
37+
workflow_dispatch:
38+
39+
permissions: {}
40+
41+
jobs:
42+
close-expired-discussions:
43+
runs-on: ubuntu-latest
44+
permissions:
45+
discussions: write
46+
steps:
47+
- name: Setup Scripts
48+
uses: githubnext/gh-aw/actions/setup@v0.35.1
49+
with:
50+
destination: /tmp/gh-aw/actions
51+
52+
- name: Close expired discussions
53+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
54+
with:
55+
script: |
56+
const { setupGlobals } = require('/tmp/gh-aw/actions/setup_globals.cjs');
57+
setupGlobals(core, github, context, exec, io);
58+
const { main } = require('/tmp/gh-aw/actions/close_expired_discussions.cjs');
59+
await main();
60+
61+
close-expired-issues:
62+
runs-on: ubuntu-latest
63+
permissions:
64+
issues: write
65+
steps:
66+
- name: Setup Scripts
67+
uses: githubnext/gh-aw/actions/setup@v0.35.1
68+
with:
69+
destination: /tmp/gh-aw/actions
70+
71+
- name: Close expired issues
72+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
73+
with:
74+
script: |
75+
const { setupGlobals } = require('/tmp/gh-aw/actions/setup_globals.cjs');
76+
setupGlobals(core, github, context, exec, io);
77+
const { main } = require('/tmp/gh-aw/actions/close_expired_issues.cjs');
78+
await main();
79+
80+
compile-workflows:
81+
runs-on: ubuntu-latest
82+
permissions:
83+
contents: read
84+
steps:
85+
- name: Checkout repository
86+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
87+
88+
- name: Setup Go
89+
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
90+
with:
91+
go-version-file: go.mod
92+
cache: true
93+
94+
- name: Build gh-aw
95+
run: make build
96+
97+
- name: Compile workflows
98+
run: |
99+
./gh-aw compile --validate --verbose
100+
echo "✓ All workflows compiled successfully"
101+
102+
- name: Check for out-of-sync workflows
103+
run: |
104+
if git diff --exit-code .github/workflows/*.lock.yml; then
105+
echo "✓ All workflow lock files are up to date"
106+
else
107+
echo "::error::Some workflow lock files are out of sync. Run 'make recompile' locally."
108+
echo "::group::Diff of out-of-sync files"
109+
git diff .github/workflows/*.lock.yml
110+
echo "::endgroup::"
111+
exit 1
112+
fi
113+
114+
zizmor-scan:
115+
runs-on: ubuntu-latest
116+
needs: compile-workflows
117+
permissions:
118+
contents: read
119+
steps:
120+
- name: Checkout repository
121+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
122+
123+
- name: Setup Go
124+
uses: actions/setup-go@41dfa10bad2bb2ae585af6ee5bb4d7d973ad74ed # v5.1.0
125+
with:
126+
go-version-file: go.mod
127+
cache: true
128+
129+
- name: Build gh-aw
130+
run: make build
131+
132+
- name: Run zizmor security scanner
133+
run: |
134+
./gh-aw compile --zizmor --verbose
135+
echo "✓ Zizmor security scan completed"

.github/workflows/go-fan.lock.yml

Lines changed: 45 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/go-fan.md

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,12 @@ imports:
2626
- shared/reporting.md
2727

2828
safe-outputs:
29-
create-discussion:
29+
create-issue:
3030
title-prefix: "[go-fan] "
31-
category: "General"
31+
labels: [go-fan, module-review]
3232
max: 1
33-
close-older-discussions: true
33+
expires: 7
34+
noop:
3435

3536
tools:
3637
serena: ["go"]
@@ -247,9 +248,9 @@ Save your progress to cache-memory:
247248

248249
This allows the round-robin to cycle through all dependencies while maintaining preference for recently updated ones.
249250

250-
## Step 8: Create Discussion
251+
## Step 8: Create Issue
251252

252-
Create a discussion summarizing your findings:
253+
Create an issue summarizing your findings:
253254

254255
**Title Format**: `Go Module Review: <module-name>`
255256

@@ -324,10 +325,14 @@ Use Serena for:
324325

325326
## Output
326327

327-
Your output MUST include:
328+
Your output depends on whether improvements are found:
329+
330+
**If improvements are found:**
328331
1. A module summary saved to `specs/mods/<module>.md`
329-
2. A discussion with your complete analysis and recommendations
332+
2. An issue with your complete analysis and recommendations
330333

331-
If you cannot find any improvements, still create a discussion noting the module is well-utilized and document your analysis in `specs/mods/`.
334+
**If no improvements are found:**
335+
1. A module summary saved to `specs/mods/<module>.md` documenting your analysis
336+
2. Call the `noop` tool with a message like: "Go Module Review complete for <module-name> - module is well-utilized, no improvements identified at this time. Analysis saved to specs/mods/<module>.md"
332337

333338
Begin your analysis! Pick the next module and start your deep review.

0 commit comments

Comments
 (0)