Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 83 additions & 0 deletions .github/workflows/stale-agent-auditor.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Copyright 2025 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: ADK Stale Agent Auditor

on:
workflow_dispatch:
schedule:
- cron: '0 6 * * *'

permissions:
contents: read
issues: write
pull-requests: write

jobs:
audit-stale-issues:
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- name: Generate Token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
owner: ${{ github.repository_owner }}

- name: Checkout your repository
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}

- name: Fetch Stale Agent Source
uses: actions/checkout@v4
with:
repository: google/adk-python
path: external-adk-source
sparse-checkout: |
contributing/samples/adk_stale_agent
sparse-checkout-cone-mode: false

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
echo "$HOME/.cargo/bin" >> $GITHUB_PATH

- name: Install dependencies
run: |
uv pip install --system requests "google-adk>=1.27.4"

- name: Run Stale Agent
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}

OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}

LLM_MODEL_NAME: 'gemini-2.5-flash'
STALE_HOURS_THRESHOLD: 72
CLOSE_HOURS_AFTER_STALE_THRESHOLD: 96

PYTHONPATH: external-adk-source/contributing/samples

run: python -m adk_stale_agent.main
Loading