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
69
70
71
1-click Yana AI safety setup for any GitHub repo.
When installed on a repo, automatically opens a PR with:
- ----
Go to: github.com/settings/apps/new
```
Name: Yana AI
Homepage URL: https://github.com/yanacuti1121/yana-ai
Webhook URL: https://yana-github-app.<your-subdomain>.workers.dev/webhook
Webhook secret: <generate a random secret>
Permissions:
Contents: Read & Write (to create files)
Pull requests: Read & Write (to open PR)
Metadata: Read
Subscribe to events:
✓ Installation
✓ Installation repositories
```
After creating: note the **App ID** and generate + download a **Private Key**.
```bash
cd github-app
npm install
npx wrangler login
npx wrangler secret put GITHUB_WEBHOOK_SECRET
npx wrangler secret put GITHUB_APP_PRIVATE_KEY # paste base64-encoded PEM
npx wrangler secret put APP_ID # numeric App ID
npm run deploy
```
```bash
base64 -w 0 private-key.pem
```
After deploy, Wrangler gives you the Worker URL.
Update it in your GitHub App settings.
```bash
npm run dev
```