mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-30 22:26:42 +00:00
- Replace stub callGitHubModel() with real GitHub Models API call using gpt-4o-mini with structured JSON output - Build detailed user messages from issue body, comments, and timeline - Add per-issue decision logging to classify step - Upload candidates.json and decisions.json as workflow artifacts
64 lines
1.7 KiB
YAML
64 lines
1.7 KiB
YAML
name: issue-resolution-triage
|
|
|
|
on:
|
|
push:
|
|
branches: [github-issue-resolver]
|
|
workflow_dispatch:
|
|
inputs:
|
|
dry_run:
|
|
description: "If true, do not close issues"
|
|
required: false
|
|
default: "true"
|
|
max_issues:
|
|
description: "How many issues to process"
|
|
required: false
|
|
default: "100"
|
|
schedule:
|
|
- cron: "17 2 * * *"
|
|
|
|
permissions:
|
|
contents: read
|
|
issues: write
|
|
pull-requests: read
|
|
models: read
|
|
|
|
# todo: remove hardcoded values
|
|
jobs:
|
|
triage:
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
DRY_RUN: "true"
|
|
MAX_ISSUES: "10"
|
|
REPO: ${{ github.repository }}
|
|
PROJECT_ID: "PVT_kwDOBfz4Jc4BVeWR"
|
|
PROJECT_STATUS_FIELD_ID: "PVTSSF_lADOBfz4Jc4BVeWRzhQ56sU"
|
|
PROJECT_CONFIDENCE_FIELD_ID: "PVTF_lADOBfz4Jc4BVeWRzhQ57x4"
|
|
PROJECT_REASON_FIELD_ID: "PVTF_lADOBfz4Jc4BVeWRzhQ5-Lg"
|
|
PROJECT_EVIDENCE_FIELD_ID: "PVTF_lADOBfz4Jc4BVeWRzhQ5-Pw"
|
|
PROJECT_LINKED_PR_FIELD_ID: "PVTF_lADOBfz4Jc4BVeWRzhQ56sc"
|
|
PROJECT_REPO_FIELD_ID: "PVTF_lADOBfz4Jc4BVeWRzhQ56sk"
|
|
PROJECT_STATUS_OPTION_NEEDS_REVIEW_ID: "a55a2be9"
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: .github/issue-resolution
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: "20"
|
|
|
|
- run: node scripts/fetch-candidates.mjs
|
|
- run: node scripts/classify-candidates.mjs
|
|
- run: node scripts/apply-decisions.mjs
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: triage-results
|
|
path: |
|
|
.github/issue-resolution/candidates.json
|
|
.github/issue-resolution/decisions.json |