From 7bf466f2b9377dba6e9fa62a9e496d1f7bda5af0 Mon Sep 17 00:00:00 2001 From: nearlyforget Date: Tue, 31 Mar 2026 05:34:44 +0000 Subject: [PATCH 1/2] Add stale agent auditor workflow --- .github/workflows/stale-agent-auditor.yml | 83 +++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 .github/workflows/stale-agent-auditor.yml diff --git a/.github/workflows/stale-agent-auditor.yml b/.github/workflows/stale-agent-auditor.yml new file mode 100644 index 0000000..ba6bb18 --- /dev/null +++ b/.github/workflows/stale-agent-auditor.yml @@ -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 + + - 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 From 99caa2f82842d022f8c90c13e3dd4c9bd4e91563 Mon Sep 17 00:00:00 2001 From: nearlyforget Date: Wed, 1 Apr 2026 23:57:27 +0000 Subject: [PATCH 2/2] Update google-adk version requirement to 1.27.4 for security --- .github/workflows/stale-agent-auditor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/stale-agent-auditor.yml b/.github/workflows/stale-agent-auditor.yml index ba6bb18..ed04229 100644 --- a/.github/workflows/stale-agent-auditor.yml +++ b/.github/workflows/stale-agent-auditor.yml @@ -64,7 +64,7 @@ jobs: - name: Install dependencies run: | - uv pip install --system requests google-adk + uv pip install --system requests "google-adk>=1.27.4" - name: Run Stale Agent env: