You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**Secrets** stay in `.env` and are referenced via `process.env`.
63
-
-**Routes**map each GitHub event type to a Slashwork group. Only configure the events you want — unconfigured events are silently ignored.
61
+
-**Routes**are path-based — each route name becomes a `/github/<name>` endpoint. Only configured routes are active — requests to unknown routes return 404.
64
62
65
63
## Slashwork Configuration
66
64
67
65
See the [Slashwork Developer docs](https://slashwork.com/developer) for full details.
68
66
69
67
1. Create a **stream** (or use an existing one) where notifications will be posted.
70
-
2. Create an **application** with a dedicated access token — this goes in `SLASHWORK_ACCESS_TOKEN`.
68
+
2. Create an **application** with a dedicated auth token — this goes in `SLASHWORK_AUTH_TOKEN`.
71
69
3. Find the **group ID** of your target stream(s) from their URLs — these go in `config.ts` routes.
72
-
4. Set `SLASHWORK_GRAPHQL_URL` to `https://<your-instance>.slashwork.com/graphql`.
73
-
5. You can test queries interactively at `https://<your-instance>.slashwork.com/graphiql`.
70
+
4. Set `SLASHWORK_GRAPHQL_URL` to `https://<your-instance>.slashwork.com/api/graphql`.
74
71
75
72
## GitHub Webhook Setup
76
73
77
74
1. Go to your repo (or org) **Settings → Webhooks → Add webhook**.
2.**Payload URL:**`https://<your-server>/github/<route-name>` (matching a route in `config.ts`)
79
76
3.**Content type:**`application/json`
80
77
4.**Secret:** Same value as your `GITHUB_WEBHOOK_SECRET` env var.
81
78
5.**Events:** Select the events you want (Pull requests, Issues, Pushes, Releases).
@@ -94,28 +91,24 @@ bun run dev
94
91
bun run start
95
92
```
96
93
97
-
## Deployment
98
-
99
-
### Railway
94
+
## Testing
100
95
101
-
Railway supports Bun natively. Push your repo, set the env vars in the dashboard, and set the start command to `bun src/index.ts`.
102
-
103
-
### Render
96
+
```sh
97
+
bun test
98
+
```
104
99
105
-
Create a new Web Service with Bun runtime and configure the env vars in the dashboard.
100
+
## Deployment
106
101
107
-
### Fly.io
102
+
Deployed to [Clever Cloud](https://clever-cloud.com) via GitHub Actions. Every push to `main` runs typecheck and tests, then deploys automatically on success.
108
103
109
-
```sh
110
-
fly launch
111
-
fly secrets set SLASHWORK_GRAPHQL_URL=... SLASHWORK_ACCESS_TOKEN=... GITHUB_WEBHOOK_SECRET=...
112
-
fly deploy
113
-
```
104
+
**Required GitHub secrets** (Settings > Secrets and variables > Actions):
105
+
-`CLEVER_TOKEN`
106
+
-`CLEVER_SECRET`
114
107
115
108
## Troubleshooting
116
109
117
110
-**Signature mismatch (401):** Ensure `GITHUB_WEBHOOK_SECRET` matches exactly between GitHub and your `.env`. Check for trailing whitespace.
118
111
-**Posts not appearing:** Verify group IDs in `config.ts` point to valid streams. Check server logs for GraphQL errors.
119
-
-**Token issues:** Ensure `SLASHWORK_ACCESS_TOKEN` has write permissions to the target groups.
112
+
-**Token issues:** Ensure `SLASHWORK_AUTH_TOKEN` has write permissions to the target groups.
120
113
-**No events received:** Confirm the webhook is active in GitHub (Settings → Webhooks) and the desired events are selected.
121
-
-**Event ignored:** Check that the event type has a route in `config.ts` and the action is one of the supported actions listed above.
114
+
-**Event ignored:** Check that the route exists in `config.ts` and the action is one of the supported actions listed above.
0 commit comments