Skip to content

Commit

Permalink
Merge branch 'refactor/move-to-delegated-compute' into development
Browse files Browse the repository at this point in the history
  • Loading branch information
0x4007 committed Feb 17, 2024
2 parents bcdd53f + e402d16 commit b85d27a
Show file tree
Hide file tree
Showing 216 changed files with 27,685 additions and 17,845 deletions.
4 changes: 4 additions & 0 deletions .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,11 @@
"micromark",
"milestoned",
"Numberish",
"OPENAI",
"orgname",
"pavlovcik",
"permisson",
"Postgrest",
"prereleased",
"probot",
"Probot",
Expand All @@ -42,13 +44,15 @@
"Supabase",
"SUPABASE",
"svgs",
"tiktoken",
"timelabel",
"TURL",
"typebox",
"Ubiqui",
"ubiquibot",
"unarchived",
"Unassigning",
"upserted",
"Upserting",
"URLSAFE",
"vitalik",
Expand Down
12 changes: 1 addition & 11 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,7 @@ WEBHOOK_SECRET=

SUPABASE_URL=
SUPABASE_KEY=
AUTO_PAY_MODE=
ANALYTICS_MODE=


# Use `trace` to get verbose logging or `info` to show less
# `fatal` `error` `info` `verbose` `debug`
LOG_LEVEL=debug
LOGDNA_INGESTION_KEY=
OPENAI_API_HOST=https://api.openai.com
OPENAI_API_KEY=
CHATGPT_USER_PROMPT_FOR_IMPORTANT_WORDS="I need your help to find important words (e.g. unique adjectives) from github issue below and I want to parse them easily so please separate them using #(No other contexts needed). Please separate the words by # so I can parse them easily. Please answer simply as I only need the important words. Here is the issue content.\n"
CHATGPT_USER_PROMPT_FOR_MEASURE_SIMILARITY='I have two github issues and I need to measure the possibility of the 2 issues are the same content (No other contents needed and give me only the number in %).\n Give me in number format and add % after the number.\nDo not tell other things since I only need the number (e.g. 85%). Here are two issues:\n 1. "%first%"\n2. "%second%"'
SIMILARITY_THRESHOLD=80
MEASURE_SIMILARITY_AI_TEMPERATURE=0
IMPORTANT_WORDS_AI_TEMPERATURE=0
46 changes: 45 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,50 @@
"plugins": ["@typescript-eslint"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"rules": {
"@typescript-eslint/no-floating-promises": "error"
"arrow-body-style": ["error", "as-needed"], // Allow single-line arrow functions without braces
"prefer-arrow-callback": ["error", { "allowNamedFunctions": false }], // Allow arrow functions for callbacks
"func-style": ["error", "declaration", { "allowArrowFunctions": false }], // Enforce function declarations and named functions
// ... other rules ...

"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/naming-convention": [
"error",
{ "selector": "typeLike", "format": ["PascalCase"] },
{ "selector": "variableLike", "format": ["camelCase"] },
{ "selector": "memberLike", "modifiers": ["private"], "format": ["camelCase"], "leadingUnderscore": "require" },
{
"selector": "variable",
"types": ["boolean"],
"format": ["PascalCase"],
"prefix": ["is", "should", "has", "can", "did", "will", "does"]
},
{
"selector": "variable",
"format": ["camelCase", "UPPER_CASE"],
"leadingUnderscore": "allow",
"trailingUnderscore": "allow"
},
{ "selector": "typeParameter", "format": ["PascalCase"], "prefix": ["T"] },
{ "selector": "interface", "format": ["PascalCase"], "custom": { "regex": "^I[A-Z]", "match": false } },
{ "selector": ["function", "variable"], "format": ["camelCase"] },
{ "selector": "variable", "modifiers": ["destructured"], "format": null },
{ "selector": "variable", "format": ["camelCase"], "leadingUnderscore": "allow", "trailingUnderscore": "allow" },

{
"selector": "parameter",
"format": ["camelCase"],
"leadingUnderscore": "allow", // This allows the use of a leading underscore
"trailingUnderscore": "allow" // This allows the use of a trailing underscore
},
{
"selector": "parameter",
"format": null,
"filter": {
// This allows parameters to be named as just an underscore
"regex": "^_$",
"match": true
}
}
]
}
}
11 changes: 9 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,21 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Enable Corepack and Install Correct Yarn Version
run: |
corepack enable
yarn set version 4.0.2
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18.16.0"
node-version: "20.10.0"
cache: "yarn"

- name: Install
run: yarn install
Expand All @@ -22,7 +29,7 @@ jobs:
run: yarn build

- name: Lint
run: yarn lint
run: yarn format

run-migration:
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ubiquity/action-conventional-commits@v1.1.2
- uses: ubiquity/action-conventional-commits@master
37 changes: 0 additions & 37 deletions .github/workflows/deploy-logger-page.yml

This file was deleted.

52 changes: 52 additions & 0 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Run E2E Tests

on:
- workflow_dispatch
- push

jobs:
e2e-test:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: "18.16.0"

- name: Install
run: yarn install

- name: Build
run: yarn build

- name: Test
env:

APP_ID: ${{ secrets.APP_ID }}
# CHATGPT_USER_PROMPT_FOR_IMPORTANT_WORDS:
# CHATGPT_USER_PROMPT_FOR_MEASURE_SIMILARITY:
DISQUALIFY_TIME: "7 days"
FOLLOW_UP_TIME: "4 days"
# IMPORTANT_WORDS_AI_TEMPERATURE:
LOG_ENVIRONMENT: "production"
# LOG_LEVEL:
# MEASURE_SIMILARITY_AI_TEMPERATURE:
# OPENAI_API_HOST:
# OPENAI_API_KEY:
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
# SIMILARITY_THRESHOLD:
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
TEST_ADMIN_PAT: ${{ secrets.TEST_ADMIN_PAT }}
TEST_ORGANIZATION_NAME: ${{ secrets.TEST_ORGANIZATION_NAME }}
TEST_OUTSIDE_COLLABORATOR_PAT: ${{ secrets.TEST_OUTSIDE_COLLABORATOR_PAT }}
TEST_REPOSITORY_NAME: ${{ secrets.TEST_REPOSITORY_NAME }}
WEBHOOK_PROXY_URL: ${{ secrets.WEBHOOK_PROXY_URL }}
WEBHOOK_SECRET: ${{ secrets.WEBHOOK_SECRET }}
X25519_PRIVATE_KEY: "QCDb30UHUkwJAGhLWC-R2N0PiEbd4vQY6qH2Wloybyo"

run: "yarn test"
7 changes: 5 additions & 2 deletions .github/workflows/kebab-case.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,14 @@ jobs:
"^\.\/dist"
"^\.\/build"
"^\.\/vendor"
"^\.\/test"
"^\.\/\.next"
"^\.\/tests"
"\.sql$"
"\.md$"
"\.d.ts$"
"^\.\/\log-app"
"\.d\.ts$"
"\.gitignore$" # Ignore .gitignore files
"\.test\.ts$" # Ignore .test.ts files
)
while read -r file; do
basefile=$(basename "$file")
Expand Down
35 changes: 0 additions & 35 deletions .github/workflows/qa-automation.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/short-files.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Check File Length

on:
push:
pull_request:

jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Check file length
run: |
IGNORE=("src/adapters/supabase/types/database.ts" "src/generatedFile2.ts") # Add more files to ignore as needed
find src -name "*.ts" -type f -exec bash -c '
for ignore in "${IGNORE[@]}"; do
if [[ "$1" == "$ignore" ]]; then
echo "Ignoring $ignore"
exit 0
fi
done
if [[ $(wc -l < "$1") -gt 512 ]]; then
echo "File $1 line length is greater than 512. This should be broken up into smaller files."
exit 1
fi
' bash {} \;
Loading

0 comments on commit b85d27a

Please sign in to comment.