Skip to content

Commit ddc4ba9

Browse files
committed
feat(primer-api): add AI-powered Primer bot for Slack
1 parent f441841 commit ddc4ba9

12 files changed

Lines changed: 1339 additions & 16 deletions

File tree

.github/workflows/primer-bot.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Primer Bot
2+
on:
3+
repository_dispatch:
4+
types: [primer-bot-question]
5+
workflow_dispatch:
6+
inputs:
7+
question:
8+
type: string
9+
description: 'Question to ask the Primer bot'
10+
required: true
11+
12+
permissions: {}
13+
14+
jobs:
15+
answer:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f
23+
with:
24+
node-version-file: '.nvmrc'
25+
cache: npm
26+
27+
- name: Install dependencies
28+
run: npm ci
29+
30+
- name: Build @primer/react
31+
run: npm run build -w packages/react
32+
33+
- name: Answer question
34+
env:
35+
GITHUB_MODELS_TOKEN: ${{ secrets.MODELS_TOKEN }}
36+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
37+
run: npx tsx packages/primer-api/src/action.ts

0 commit comments

Comments
 (0)