File tree Expand file tree Collapse file tree 5 files changed +61
-13
lines changed Expand file tree Collapse file tree 5 files changed +61
-13
lines changed Original file line number Diff line number Diff line change 1
- .git
1
+ .git /
2
+ .github /
3
+ .vscode /
4
+ node_modules /
5
+ manifests /
2
6
.env *
7
+ .gitignore
3
8
.dockerignore
4
9
.prettierrc
5
- .vscode
6
- node_modules
7
10
README.md
8
11
docker-compose.yml
9
12
Dockerfile *
Original file line number Diff line number Diff line change 102
102
103
103
# TernJS port file
104
104
.tern-port
105
+
106
+ manifests /secrets /
Original file line number Diff line number Diff line change @@ -6,3 +6,18 @@ build-debug:
6
6
7
7
run :
8
8
docker run --entrypoint=sh --env-file=.env -it notion-bot:latest-debug
9
+
10
+ # For minikube
11
+ apply :
12
+ kubectl apply -f manifests
13
+
14
+ install-sealed-secrets :
15
+ helm repo add sealed-secrets https://bitnami-labs.github.io/sealed-secrets
16
+ helm install --namespace kube-system notion-bot sealed-secrets/sealed-secrets
17
+
18
+ secret-init :
19
+ kubectl create secret generic notion-bot --dry-run=client --from-env-file=.env -o yaml > manifests/secrets/non-encrypted-secrets.yml
20
+
21
+ secret-update :
22
+ cat manifests/secrets/non-encrypted-secrets.yml | kubeseal --controller-name=notion-bot-sealed-secrets --controller-namespace=kube-system --format yaml > manifests/secrets/secrets.yaml
23
+ kubectl replace -f manifests/secrets/secrets.yaml
Original file line number Diff line number Diff line change 1
1
# Notion bot
2
2
3
- A Slack bot searches pages in Notion DB.
3
+ 🤖 A Slack bot searches pages in Notion DB.
4
4
5
- ## Quick start
5
+ ## Features
6
6
7
- run on k8s
7
+ - Select/change DB on modal
8
+ - Add/delete filters in modal
9
+ - Display page search results in modal
10
+ - Display page search results in threads
8
11
9
- ``` bash
10
- kubectl apply -f manifests
11
- ```
12
+ ## Quick start
12
13
13
14
run locally
14
15
@@ -19,3 +20,27 @@ export SLACK_APP_TOKEN=xxx
19
20
export NOTION_TOKEN=xxx
20
21
docker compose up
21
22
```
23
+
24
+ run on k8s
25
+
26
+ ``` bash
27
+ cp .env.example .env
28
+ # edit .env
29
+
30
+ make install-sealed-secrets
31
+ make secret-init
32
+ make secret-update
33
+ make apply
34
+ ```
35
+
36
+ ## Usage
37
+
38
+ 1 . Mention to bot
39
+ - <img width =" 473 " alt =" image " src =" https://github.com/litencatt/notion-bot/assets/17349045/a284735f-3fa4-4234-999c-144bbfaa1bc6 " >
40
+ 2 . Click button in reply message received thread, then open a modal.
41
+ - <img width =" 576 " alt =" image " src =" https://github.com/litencatt/notion-bot/assets/17349045/6c17600e-a8aa-4127-ad01-5364ee993631 " >
42
+ - <img width =" 528 " alt =" image " src =" https://github.com/litencatt/notion-bot/assets/17349045/3f2cda27-49ea-4d6d-bb92-7bc7389928e0 " >
43
+ 3 . You can search pages in selected Notion DB with filters.
44
+ - <img width =" 523 " alt =" image " src =" https://github.com/litencatt/notion-bot/assets/17349045/f5dc07a3-e373-4f3f-b387-20e068955e23 " >
45
+ 4 . Click submit, if you want to show result in thread.
46
+ - <img width =" 576 " alt =" image " src =" https://github.com/litencatt/notion-bot/assets/17349045/ed239da8-4d5a-44b5-9ed0-34f796163f0c " >
Original file line number Diff line number Diff line change @@ -4,6 +4,9 @@ metadata:
4
4
name : notion-bot
5
5
spec :
6
6
replicas : 1
7
+ selector :
8
+ matchLabels :
9
+ name : notion-bot
7
10
template :
8
11
metadata :
9
12
labels :
@@ -20,19 +23,19 @@ spec:
20
23
valueFrom :
21
24
secretKeyRef :
22
25
name : notion-bot
23
- key : slack-signing-secret
26
+ key : SLACK_SIGNING_SECRET
24
27
- name : SLACK_BOT_TOKEN
25
28
valueFrom :
26
29
secretKeyRef :
27
30
name : notion-bot
28
- key : slack-bot-token
31
+ key : SLACK_BOT_TOKEN
29
32
- name : SLACK_APP_TOKEN
30
33
valueFrom :
31
34
secretKeyRef :
32
35
name : notion-bot
33
- key : slack-app-token
36
+ key : SLACK_APP_TOKEN
34
37
- name : NOTION_TOKEN
35
38
valueFrom :
36
39
secretKeyRef :
37
40
name : notion-bot
38
- key : notion-token
41
+ key : NOTION_TOKEN
You can’t perform that action at this time.
0 commit comments