Skip to content
This repository has been archived by the owner on Sep 19, 2024. It is now read-only.

Commit

Permalink
chore: check necessary environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4007 committed Dec 14, 2023
1 parent 115a103 commit 3ee39e0
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 142 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
APP_ID=
PRIVATE_KEY=
APP_PRIVATE_KEY=

# Go to https://smee.io/new set this to the URL that you are redirected to.
WEBHOOK_PROXY_URL=
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,9 @@ jobs:
# MEASURE_SIMILARITY_AI_TEMPERATURE:
# OPENAI_API_HOST:
# OPENAI_API_KEY:
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
# SIMILARITY_THRESHOLD:
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
# SUPABASE_PROJECT_ID:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
TEST_ADMIN_PAT: ${{ secrets.TEST_ADMIN_PAT }}
TEST_ORGANIZATION_NAME: ${{ secrets.TEST_ORGANIZATION_NAME }}
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/qa-automation.yml

This file was deleted.

98 changes: 0 additions & 98 deletions .github/workflows/update-config.yml

This file was deleted.

8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ cd ubiquibot
yarn
yarn build (to compile your changes)

yarn build --watch (to locally auto compile your changes)
yarn build --watch (to locally auto compile your changes)

yarn start:watch

Expand All @@ -54,9 +54,9 @@ yarn start:watch
- `WEBHOOK_PROXY_URL`: (required) should be automatically filled when you install Ubiquibot
- `WEBHOOK_SECRET`: (required) should be automatically filled when the app is installed

`APP_ID` and `PRIVATE_KEY` are [here](https://t.me/c/1588400061/1627) for core team developers to use.
`APP_ID` and `APP_PRIVATE_KEY` are [here](https://t.me/c/1588400061/1627) for core team developers to use.

If you are an external developer, `APP_ID`and `PRIVATE_KEY` are automatically generated when you install the app on your repository.
If you are an external developer, `APP_ID`and `APP_PRIVATE_KEY` are automatically generated when you install the app on your repository.

## How to run locally

Expand Down Expand Up @@ -258,7 +258,7 @@ DISQUALIFY_TIME="7 days" // 7 days
- in another instance run `yarn start:watch` (runs the bot locally)
5. Open `http://localhost:3000` and follow instructions to add the bot to one of your repositories.

At this point the `.env` files auto-fill the empty fields (`PRIVATE_KEY` and `APP_ID`) if it is not previously filled.
At this point the `.env` files auto-fill the empty fields (`APP_PRIVATE_KEY` and `APP_ID`) if it is not previously filled.
Now you can make changes to the repository on GitHub (e.g. add a bounty) and the bot should react.

6. After adding the bot (as a installed app) to your github you will need to restart the aforemention yarn start:watch so CTRL-C to stop the node daemon and `yarn start:watch` again
Expand Down
4 changes: 2 additions & 2 deletions src/types/configuration-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,13 @@ export function stringDuration(options?: StringOptions) {
}

const envConfigSchema = T.Object({
WEBHOOK_PROXY_URL: T.String({ format: "uri" }),
WEBHOOK_PROXY_URL: T.Optional(T.String({ format: "uri" })), // optional for production
LOG_LEVEL: T.Enum(LogLevel, { default: LogLevel.DEBUG }),
LOG_RETRY_LIMIT: T.Number({ default: 8 }),
SUPABASE_URL: T.String({ format: "uri" }),
SUPABASE_KEY: T.String(),
X25519_PRIVATE_KEY: T.String(),
PRIVATE_KEY: T.String(),
APP_PRIVATE_KEY: T.String(),
APP_ID: T.Number(),
});

Expand Down

0 comments on commit 3ee39e0

Please sign in to comment.