Skip to content

Commit c90d247

Browse files
committed
Remove unnecessary permissions and add maintenance workflow for closing expired discussions and issues
1 parent ada98f2 commit c90d247

4 files changed

Lines changed: 79 additions & 3 deletions

File tree

workflows/agentics-maintenance.yml

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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.37.0). 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: Agentic Maintenance
33+
34+
on:
35+
schedule:
36+
- cron: "37 0 * * *" # Daily (based on minimum expires: 7 days)
37+
workflow_dispatch:
38+
39+
permissions: {}
40+
41+
jobs:
42+
close-expired-discussions:
43+
runs-on: ubuntu-slim
44+
permissions:
45+
discussions: write
46+
steps:
47+
- name: Setup Scripts
48+
uses: githubnext/gh-aw/actions/setup@v0.37.0
49+
with:
50+
destination: /opt/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('/opt/gh-aw/actions/setup_globals.cjs');
57+
setupGlobals(core, github, context, exec, io);
58+
const { main } = require('/opt/gh-aw/actions/close_expired_discussions.cjs');
59+
await main();
60+
61+
close-expired-issues:
62+
runs-on: ubuntu-slim
63+
permissions:
64+
issues: write
65+
steps:
66+
- name: Setup Scripts
67+
uses: githubnext/gh-aw/actions/setup@v0.37.0
68+
with:
69+
destination: /opt/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('/opt/gh-aw/actions/setup_globals.cjs');
76+
setupGlobals(core, github, context, exec, io);
77+
const { main } = require('/opt/gh-aw/actions/close_expired_issues.cjs');
78+
await main();

workflows/daily-perf-improver.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ timeout-minutes: 60
1515

1616
permissions:
1717
all: read
18-
id-token: write # for auth in some actions
1918

2019
network: defaults
2120

workflows/daily-team-status.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ safe-outputs:
2222
create-issue:
2323
title-prefix: "[team-status] "
2424
labels: [report, daily-status]
25-
close-older-issues: true
25+
# close-older-issues: true TODO
2626
---
2727

2828
# Daily Team Status

workflows/daily-test-improver.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ timeout-minutes: 30
1414

1515
permissions:
1616
all: read
17-
id-token: write # for auth in some actions
1817

1918
network: defaults
2019

0 commit comments

Comments
 (0)