Skip to content

Commit 67fceb5

Browse files
DeanChensjcopybara-github
authored andcommitted
chore: Consolidate spam monitoring and stale issue auditing workflows
Consolidates the two daily issue-cleaning background agents (`stale-bot.yml` and `issue-monitor.yml`) into a single, unified, parallelized workflow `issue-maintenance.yml`. Both agents run once a day at 6:00 AM UTC. Merging them into parallel jobs within a single workflow: 1. Prevents GitHub Actions run history clutter by grouping the daily sweeps into exactly one daily run card. 2. Provides a clean, unified manual trigger (workflow_dispatch) console in the GitHub UI, allowing developers to run either or both agents with a simple dropdown and checkbox menu. 3. Eliminates duplicate YAML boilerplate. Co-authored-by: Shangjie Chen <deanchen@google.com> PiperOrigin-RevId: 936714448
1 parent a238884 commit 67fceb5

3 files changed

Lines changed: 100 additions & 122 deletions

File tree

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
# Copyright 2026 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: "ADK Issue Tracker Maintenance"
16+
17+
on:
18+
# Daily background cleanup at 6:00 AM UTC (10 PM PST)
19+
schedule:
20+
- cron: '0 6 * * *'
21+
22+
# Allows manual triggering from the Actions console
23+
workflow_dispatch:
24+
inputs:
25+
run_spam_monitor:
26+
description: 'Run Issue Monitoring Agent (Spam Sweep)'
27+
type: boolean
28+
default: true
29+
full_scan:
30+
description: 'For Issue Monitoring: Run an Initial Full Scan of ALL open issues'
31+
type: boolean
32+
default: false
33+
run_stale_auditor:
34+
description: 'Run Stale Issue Auditor Agent'
35+
type: boolean
36+
default: true
37+
38+
permissions:
39+
issues: write
40+
contents: read
41+
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.ADK_TRIAGE_AGENT }}
44+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
45+
OWNER: ${{ github.repository_owner }}
46+
REPO: adk-python
47+
CONCURRENCY_LIMIT: 3
48+
LLM_MODEL_NAME: "gemini-3.5-flash"
49+
PYTHONPATH: contributing/samples/adk_team
50+
51+
jobs:
52+
# 1. Sweep for spam, advertising, and invalid issues
53+
sweep-spam:
54+
if: |
55+
github.repository == 'google/adk-python' &&
56+
(github.event_name == 'schedule' || github.event.inputs.run_spam_monitor == 'true')
57+
runs-on: ubuntu-latest
58+
timeout-minutes: 120
59+
steps:
60+
- name: Checkout repository
61+
uses: actions/checkout@v6
62+
63+
- name: Set up Python
64+
uses: actions/setup-python@v6
65+
with:
66+
python-version: '3.11'
67+
68+
- name: Install dependencies
69+
run: |
70+
python -m pip install --upgrade pip
71+
pip install requests google-adk python-dotenv
72+
73+
- name: Run Issue Monitoring Agent (Spam Sweep)
74+
env:
75+
INITIAL_FULL_SCAN: ${{ github.event.inputs.full_scan == 'true' }}
76+
run: python -m adk_issue_monitoring_agent.main
77+
78+
# 2. Audit inactive issues and nudge/close them
79+
audit-stale:
80+
if: |
81+
github.repository == 'google/adk-python' &&
82+
(github.event_name == 'schedule' || github.event.inputs.run_stale_auditor == 'true')
83+
runs-on: ubuntu-latest
84+
timeout-minutes: 60
85+
steps:
86+
- name: Checkout repository
87+
uses: actions/checkout@v6
88+
89+
- name: Set up Python
90+
uses: actions/setup-python@v6
91+
with:
92+
python-version: '3.11'
93+
94+
- name: Install dependencies
95+
run: |
96+
python -m pip install --upgrade pip
97+
pip install requests google-adk python-dateutil
98+
99+
- name: Run Stale Auditor Agent
100+
run: python -m adk_stale_agent.main

.github/workflows/issue-monitor.yml

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

.github/workflows/stale-bot.yml

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

0 commit comments

Comments
 (0)