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 : Auto-Answer Issues
2+
3+ on :
4+ issues :
5+ types : [opened, labeled]
6+
7+ permissions :
8+ issues : write
9+ contents : read
10+
11+ jobs :
12+ answer-issue :
13+ runs-on : ubuntu-latest
14+ # Optional: only run for issues with a specific label
15+ # if: contains(github.event.issue.labels.*.name, 'question')
16+ steps :
17+ - name : Checkout repository
18+ uses : actions/checkout@v4
19+
20+ - name : Setup Node.js
21+ uses : actions/setup-node@v4
22+ with :
23+ node-version : ' 20'
24+
25+ - name : Install dependencies
26+ run : npm install @octokit/rest openai
27+
28+ - name : Generate and post response
29+ env :
30+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
31+ OPENAI_API_KEY : ${{ secrets.OPENAI_API_KEY }}
32+ ISSUE_NUMBER : ${{ github.event.issue.number }}
33+ ISSUE_TITLE : ${{ github.event.issue.title }}
34+ ISSUE_BODY : ${{ github.event.issue.body }}
35+ REPO_OWNER : ${{ github.repository_owner }}
36+ REPO_NAME : ${{ github.event.repository.name }}
37+ run : node .github/scripts/answer-issue.js
You can’t perform that action at this time.
0 commit comments