Skip to content

Commit 21a7dfa

Browse files
hubyrodclaude
andcommitted
Update README to reflect current project state
- Fix authToken naming (was accessToken) - Update routing docs to path-based routes - Replace generic deployment options with Clever Cloud + CI - Add testing section - Fix GraphQL URL and webhook payload URL Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 6ae44a5 commit 21a7dfa

1 file changed

Lines changed: 18 additions & 25 deletions

File tree

README.md

Lines changed: 18 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -46,36 +46,33 @@ const config: SkiphooksConfig = {
4646
},
4747
slashwork: {
4848
graphqlUrl: process.env.SLASHWORK_GRAPHQL_URL!,
49-
accessToken: process.env.SLASHWORK_ACCESS_TOKEN!,
49+
authToken: process.env.SLASHWORK_AUTH_TOKEN!,
5050
},
5151
routes: {
52-
pull_request: { groupId: "group-abc-123" },
53-
issues: { groupId: "group-abc-123" },
54-
push: { groupId: "group-def-456" },
55-
release: { groupId: "group-ghi-789" },
52+
"my-project": { groupId: "group-abc-123" },
53+
"releases": { groupId: "group-def-456" },
5654
},
5755
};
5856

5957
export default config;
6058
```
6159

6260
- **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.
6462

6563
## Slashwork Configuration
6664

6765
See the [Slashwork Developer docs](https://slashwork.com/developer) for full details.
6866

6967
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`.
7169
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`.
7471

7572
## GitHub Webhook Setup
7673

7774
1. Go to your repo (or org) **Settings → Webhooks → Add webhook**.
78-
2. **Payload URL:** `https://<your-server>/github-webhook`
75+
2. **Payload URL:** `https://<your-server>/github/<route-name>` (matching a route in `config.ts`)
7976
3. **Content type:** `application/json`
8077
4. **Secret:** Same value as your `GITHUB_WEBHOOK_SECRET` env var.
8178
5. **Events:** Select the events you want (Pull requests, Issues, Pushes, Releases).
@@ -94,28 +91,24 @@ bun run dev
9491
bun run start
9592
```
9693

97-
## Deployment
98-
99-
### Railway
94+
## Testing
10095

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+
```
10499

105-
Create a new Web Service with Bun runtime and configure the env vars in the dashboard.
100+
## Deployment
106101

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.
108103

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`
114107

115108
## Troubleshooting
116109

117110
- **Signature mismatch (401):** Ensure `GITHUB_WEBHOOK_SECRET` matches exactly between GitHub and your `.env`. Check for trailing whitespace.
118111
- **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.
120113
- **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

Comments
 (0)