Skip to content

Commit

Permalink
docs: update configurations
Browse files Browse the repository at this point in the history
  • Loading branch information
bytemain committed Oct 15, 2024
1 parent 7d58190 commit 0c837ef
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 13 deletions.
13 changes: 2 additions & 11 deletions docs/kv.md → docs/configurations.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
# Workers KV
# Configurations

We use the Workers KV to store some configuration.

## Create KV Namespace

You need to create a KV Namepsace, and set it's id in the `.env` file:

```dotenv
KV_LOCAL_ID=xxxx
KV_PROD_ID=xxxxx
```
We use the KV to store some configuration.

## Webhooks Configuration

Expand Down
14 changes: 12 additions & 2 deletions docs/how-to-use.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,16 @@ https://worker.bot/github/app/opensumi-core

set `secret` to the value you seted in <https://worker.bot/configuration/opensumi-core/app-settings>

When create bot done, you can get the last two secrets you need:
When create bot done, you can get **App ID** and **private key**,
but you need to transform the format of private key to PKCS#8 format, you can use this command:

**App ID** and **private key**, and set it's value to <https://worker.bot/configuration/opensumi-core/app-settings>.
```sh
// https://github.com/gr2m/cloudflare-worker-github-app-example/blob/main/worker.js

// The private-key.pem file from GitHub needs to be transformed from the
// PKCS#1 format to PKCS#8, as the crypto APIs do not support PKCS#1:

openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in private-key.pem -out private-key-pkcs8.pem
```

Then you can set the configuration in <https://worker.bot/configuration/opensumi-core/app-settings>.

0 comments on commit 0c837ef

Please sign in to comment.