Run IssueLens Agent #9
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Run IssueLens Agent | |
| on: | |
| # issues: | |
| # types: [opened] | |
| workflow_dispatch: | |
| inputs: | |
| issue_number: | |
| description: 'Issue number to triage' | |
| required: true | |
| type: string | |
| 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 }} | |
| - name: Upload triage output | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: triage-output | |
| path: triage-output.txt | |
| retention-days: 30 |