-
Notifications
You must be signed in to change notification settings - Fork 158
68 lines (57 loc) · 2.13 KB
/
issueLens-run.yml
File metadata and controls
68 lines (57 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Run IssueLens Agent
on:
issues:
types: [opened]
workflow_dispatch:
inputs:
issue_number:
description: 'Issue number to triage'
required: true
type: string
permissions:
issues: write
contents: read
jobs:
run-issuelens:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js 22
uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install GitHub Copilot CLI
run: npm install -g @github/copilot
- name: Determine issue number
id: issue
run: |
if [ "${{ github.event_name }}" = "issues" ]; then
echo "number=${{ github.event.issue.number }}" >> $GITHUB_OUTPUT
else
echo "number=${{ inputs.issue_number }}" >> $GITHUB_OUTPUT
fi
- name: Run IssueLens with Copilot CLI
id: issuelens
run: |
# Create MCP config
echo '{"mcpServers": {"javatooling-search": {"type": "http", "url": "${{ secrets.JAVATOOLING_INDEX_URL }}"}}}' > mcp-config.json
# Run copilot CLI with issuelens custom agent
output=$(copilot --agent=issuelens --allow-all --enable-all-github-mcp-tools --no-custom-instructions --no-ask-user --additional-mcp-config @mcp-config.json --prompt "triage issue #${{ steps.issue.outputs.number }} for repo \"${{ github.repository }}\"" 2>&1 || true)
echo "Raw output:"
echo "$output"
# Save to file for artifact upload
echo "$output" > triage-output.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COPILOT_GITHUB_TOKEN: ${{ secrets.PAT }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JAVATOOLING_INDEX_URL: ${{ secrets.JAVATOOLING_INDEX_URL }}
MAILING_URL: ${{ secrets.MAILING_URL }}
REPORT_RECIPIENTS: ${{ secrets.REPORT_RECIPIENTS }}
- name: Upload triage output
uses: actions/upload-artifact@v4
with:
name: triage-output
path: triage-output.txt
retention-days: 30