File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Run Copilot Cli PoC
2+
3+ on :
4+ workflow_dispatch :
5+
6+ env :
7+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8+
9+ jobs :
10+ run-poc :
11+ runs-on : ubuntu-latest
12+
13+ permissions :
14+ pull-requests : write
15+
16+ steps :
17+ - name : Checkout code
18+ uses : actions/checkout@v4
19+
20+ - name : Setup Node.js
21+ uses : actions/setup-node@v4
22+ with :
23+ node-version : ' 24'
24+
25+ - name : Install GitHub Copilot CLI
26+ run : |
27+ npm install -g @github/copilot || {
28+ echo "Error: Failed to install GitHub Copilot CLI"
29+ exit 1
30+ }
31+
32+ - name : Query Copilot
33+ id : analyze
34+ run : |
35+ if ! copilot -p "How many C# files are in this repository?" > analysis.txt 2>copilot-error.log; then
36+ echo "Error: Copilot CLI failed"
37+ echo "Error details:"
38+ cat copilot-error.log
39+ exit 1
40+ fi
41+
42+ if [ ! -s analysis.txt ]; then
43+ echo "Error: Copilot produced no output"
44+ exit 1
45+ fi
46+
47+ cat analysis.txt
You can’t perform that action at this time.
0 commit comments