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
67 changes: 67 additions & 0 deletions .github/workflows/issue-triage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: UCP Issue Triaging Agent

on:
issues:
types: [opened, edited]
schedule:
- cron: '0 7 * * *' # daily at 8am
workflow_dispatch:
inputs:
issue_number:
description: 'The Issue number to triage'
required: true
type: 'string'

permissions:
issues: write
contents: read

jobs:
agent-triage-issue:
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 repository
uses: actions/checkout@v4

- name: Checkout .github repository for org-level configuration
uses: actions/checkout@v4
with:
repository: ${{ github.repository_owner }}/.github
path: .github_org
ref: main
token: ${{ steps.app-token.outputs.token }}

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

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests google-adk python-dotenv

- name: Run Triaging Script
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
EVENT_NAME: ${{ github.event_name }}
ISSUE_NUMBER: ${{ github.event.issue.number || github.event.inputs.issue_number }}
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_BODY: ${{ github.event.issue.body }}
INTERACTIVE: ${{ vars.UCP_ISSUE_TRIAGE_INTERACTIVE || 0 }}
PYTHONPATH: ${{ github.workspace }}/.github_org/agents
BUG_REPORT_TEMPLATE_MD_PATH: ${{ github.workspace }}/.github_org/.github/ISSUE_TEMPLATE/bug_report.md
FEATURE_REQUEST_TEMPLATE_MD_PATH: ${{ github.workspace }}/.github_org/.github/ISSUE_TEMPLATE/feature_request.md
run: python -m issue_triage_agent.main
Loading