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

Refactor/general #644

Merged
merged 536 commits into from
Feb 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
536 commits
Select commit Hold shift + click to select a range
5d73a89
refactor: cleanup
0x4007 Oct 27, 2023
a5eac54
fix: filepath
0x4007 Oct 27, 2023
6cf0f77
chore: init refactor bot config
0x4007 Oct 27, 2023
69a29b7
refactor(config): ajv broken cant figure out what the error message m…
0x4007 Oct 28, 2023
bcb35cd
chore(ajv): had to disable strict validation no idea what the origin …
0x4007 Oct 28, 2023
b414d45
fix(ajv): loading default config is stable
0x4007 Oct 28, 2023
bdf0ba4
chore: this is all broken
0x4007 Oct 28, 2023
90ce391
Merge remote-tracking branch 'pavlovcik/refactor/general' into custom…
whilefoo Oct 29, 2023
51d069f
Merge pull request #29 from ubiquity-whilefoo/custom-context
0x4007 Oct 30, 2023
369d885
feat: contributor incentives
0x4007 Oct 31, 2023
6161872
feat: contributor incentives
0x4007 Oct 31, 2023
24bf782
Merge remote-tracking branch 'pavlovcik/refactor/general' into feat/c…
0x4007 Oct 31, 2023
0d66ce5
revert: undo context merges
0x4007 Oct 31, 2023
da5bebe
chore: add context and hold off on full incentives scoring
0x4007 Oct 31, 2023
6d00852
chore: add context and hold off on full incentives scoring
0x4007 Oct 31, 2023
2710fcb
refactor: try and calculate main scores
0x4007 Oct 31, 2023
c55e93c
refactor(scoring): trying to consolidate into single normalization an…
0x4007 Oct 31, 2023
0222f5a
chore: create permit comment mockup and interfaces
0x4007 Nov 1, 2023
37b3e2a
fix(ms): safe ms wrapper because does not support months
0x4007 Nov 2, 2023
b0035a6
feat: aggregate errors
0x4007 Nov 2, 2023
326a2b7
Delete .github/ISSUE_TEMPLATE/sweep-template.yml
0x4007 Nov 2, 2023
d6414c2
fix: wildcard unassigns
0x4007 Nov 2, 2023
bf8f20a
feat: allow setting price label only
0x4007 Nov 2, 2023
f6e23eb
feat: tried zod
whilefoo Nov 2, 2023
f5da0ab
Merge remote-tracking branch 'pavlovcik/refactor/general' into refact…
whilefoo Nov 2, 2023
85a3bf4
feat: new config
whilefoo Nov 3, 2023
3e939d5
fix: circular dependencies
whilefoo Nov 4, 2023
4926daf
fix: schema and decode
whilefoo Nov 5, 2023
776938a
fix: payload user type
whilefoo Nov 5, 2023
85f43ca
feat: contributor incentives total scoring (unstable)
0x4007 Nov 5, 2023
79347a7
fix: main type errors
0x4007 Nov 6, 2023
0693854
refactor: generalizing the contribution scoring schema
0x4007 Nov 7, 2023
0287185
feat: comment scoring cleaned up and includes more information
0x4007 Nov 7, 2023
28d67cd
fix: almost at the end of making better types for scoring
0x4007 Nov 8, 2023
3c67919
fix: transform/decode, config validation at the start
whilefoo Nov 8, 2023
53d899b
fix: got to permit generation
0x4007 Nov 8, 2023
dd465d2
fix: type errors
0x4007 Nov 8, 2023
db35021
fix: permit type errors
0x4007 Nov 8, 2023
666a072
fix: type errors almost completed
0x4007 Nov 8, 2023
e8aa4c6
fix: all type errors fixed
0x4007 Nov 9, 2023
ba91015
feat(start): works with only price set
0x4007 Nov 9, 2023
33b955c
feat: error messages, probot context in adapters
whilefoo Nov 10, 2023
2ef0cdb
feat: initialize
wannacfuture Nov 10, 2023
a8391c8
fix: some runtime bugs
0x4007 Nov 11, 2023
047998b
Merge remote-tracking branch 'pavlovcik/feat/contributor-incentives-t…
0x4007 Nov 11, 2023
d0f62e0
refactor: cleanup
0x4007 Nov 11, 2023
8897087
fix: tests
whilefoo Nov 12, 2023
1100888
fix: added comment
whilefoo Nov 13, 2023
1e1fe26
refactor: small adjustments
0x4007 Nov 13, 2023
d057dc6
Merge branch 'refactor/bot-config' of https://github.com/ubiquity-whi…
0x4007 Nov 13, 2023
528b8c6
refactor: organize imports
0x4007 Nov 13, 2023
54a7066
Merge branch 'ubiquity-whilefoo-refactor/bot-config' into feat/contri…
0x4007 Nov 13, 2023
a0e488e
fix: build errors
0x4007 Nov 13, 2023
53428a5
fix(config): token limit moved to misc
0x4007 Nov 14, 2023
bcdd53f
Delete .github/ubiquibot-config.yml
0x4007 Nov 14, 2023
e1be6a8
fix(config): loader still not stable
0x4007 Nov 14, 2023
d8fd54c
refactor: cleanup
0x4007 Nov 14, 2023
232cecd
feat: remove zod
whilefoo Nov 14, 2023
4cc7866
fix: merge before validation/defaults
whilefoo Nov 14, 2023
ca1d827
feat: custom merge for arrays and change commands to disabledCommands
whilefoo Nov 16, 2023
62cb0c6
Merge pull request #45 from ubiquity-whilefoo/fix-config
0x4007 Nov 16, 2023
4ccce56
feat: logs do not render in console or comment if filtered out based …
0x4007 Nov 16, 2023
2949f7e
feat: logs do not render in comment if filtered out and if bubbled to…
0x4007 Nov 16, 2023
3806a89
fix: refactored 'ubiquibot-config.yml' and redesigned logger statements
0x4007 Nov 17, 2023
6253435
feat: comment on commit
0x4007 Nov 17, 2023
5dfc27e
feat: improved comment posting and structured metadata util
0x4007 Nov 17, 2023
af772be
feat: duplication fix
wannacfuture Nov 17, 2023
ad8e068
feat: minor fix
wannacfuture Nov 17, 2023
880281c
feat: minor fix
wannacfuture Nov 17, 2023
d00946c
Merge pull request #48 from pavlovcik/feat/contributor-incentives-tot…
0x4007 Nov 17, 2023
82450db
refactor: type property to className
0x4007 Nov 17, 2023
1d6da4b
Merge branch 'feat/contributor-incentives-total-scoring' of https://g…
0x4007 Nov 17, 2023
951449c
feat: duplication collaborator
wannacfuture Nov 18, 2023
f5a5c5c
Merge pull request #50 from wannacfuture/feat/contributor-incentives-…
0x4007 Nov 19, 2023
40005e6
feat: remove context from addapters and pass it by parameter
whilefoo Nov 19, 2023
db19706
fix: change to undefined
whilefoo Nov 19, 2023
df8bc59
fix: initialize only once
whilefoo Nov 19, 2023
4713afa
feat: logger inside context
whilefoo Nov 20, 2023
4cbbf38
chore: delete ubiquibot-config-default.ts and modify
0x4007 Nov 21, 2023
1d7f061
Merge pull request #51 from ubiquity-whilefoo/runtime-fix
0x4007 Nov 21, 2023
0724395
fix: logs constructor arguments order
0x4007 Nov 21, 2023
e36fe96
feat: integrate infrastructure
wannacfuture Nov 22, 2023
684a97c
Merge branch 'feat/contributor-incentives-total-scoring' into feat/co…
wannacfuture Nov 22, 2023
10a7557
feat: update
wannacfuture Nov 22, 2023
edfc1f5
feat: update
wannacfuture Nov 22, 2023
f90fc56
feat: removep package lock
wannacfuture Nov 22, 2023
c6a07bd
fix: await promise
0x4007 Nov 23, 2023
23ef147
feat: replace issue helpers with paginate
whilefoo Nov 23, 2023
f6fa2ad
feat: minor fix
wannacfuture Nov 24, 2023
d4a8794
Merge branch 'feat/contributor-incentives-total-scoring-duplicate-fix…
wannacfuture Nov 24, 2023
be2baae
fix: linting issues and improve code readability
0x4007 Nov 25, 2023
950300b
fix: linting issues and improve code readability
0x4007 Nov 25, 2023
06dd7b8
fix: linter issues
0x4007 Nov 25, 2023
9151881
fix: lint staged
0x4007 Nov 25, 2023
c427d09
fix: import paths in files
0x4007 Nov 25, 2023
87e56aa
refactor: remove unnecessary barrelling
0x4007 Nov 25, 2023
8277400
feat: kebab-case check in pre-commit
0x4007 Nov 25, 2023
b700ce5
feat: add paginate and catch everywhere
whilefoo Nov 25, 2023
5e99029
Merge pull request #53 from ubiquity-whilefoo/paginate-fix
0x4007 Nov 26, 2023
55c68b7
refactor: remove unused exports and functions
0x4007 Nov 26, 2023
5cd3d6d
Merge branch 'feat/contributor-incentives-total-scoring-duplicate-fix…
0x4007 Nov 26, 2023
609b15f
Merge remote-tracking branch 'pavlovcik/feat/contributor-incentives-t…
0x4007 Nov 26, 2023
761fdd2
Merge branch 'refactor/type-locations' into feat/contributor-incentiv…
0x4007 Nov 26, 2023
bcd04c0
Merge branch 'feat/contributor-incentives-total-scoring' into refacto…
0x4007 Nov 26, 2023
10f14f8
chore: sync readme
0x4007 Nov 26, 2023
1ee033c
Merge branch 'development' into refactor/general
0x4007 Nov 26, 2023
d83f8c5
fix: add jest types again
0x4007 Nov 26, 2023
5e22ebb
fix: kebab case
0x4007 Nov 26, 2023
c1e4852
fix: logger
0x4007 Nov 26, 2023
13e3b88
feat: convert errors to fatal and warn to errors because seems less a…
0x4007 Nov 26, 2023
bdcfb73
chore: update push event logging messages
0x4007 Nov 27, 2023
ac2534e
fix: log level and error handling
0x4007 Nov 27, 2023
b1cc46f
revert: this needs type information
0x4007 Nov 27, 2023
db5ee8f
fix: default branch in dispatchWorkflow
0x4007 Nov 27, 2023
2cc0052
chore: kebab case
0x4007 Nov 27, 2023
933cdcd
refactor: issueNumber
0x4007 Nov 27, 2023
5f3c94e
chore: add knip ci workflow
gitcoindev Nov 28, 2023
72f5fe2
chore: add knip.ts configuration skeleton
gitcoindev Nov 28, 2023
f5d45bc
Update event.ts
0x4007 Dec 2, 2023
c37115b
feat: update
wannacfuture Dec 5, 2023
96aebdd
Update webhooks.ts
wannacfuture Dec 5, 2023
d478166
feat: update
wannacfuture Dec 5, 2023
ea077a0
Merge branch 'refactor/general' of https://github.com/wannacfuture/ub…
wannacfuture Dec 5, 2023
daa134a
feat: update
wannacfuture Dec 5, 2023
5e2500f
feat: update
wannacfuture Dec 5, 2023
8b92e0c
feat: update
wannacfuture Dec 5, 2023
a83b91e
feat: update
wannacfuture Dec 5, 2023
570f63b
feat: update
wannacfuture Dec 5, 2023
8d1def4
feat: add app deploy documentation
wannacfuture Dec 5, 2023
7346df1
feat: delete
wannacfuture Dec 5, 2023
f65270a
feat: update
wannacfuture Dec 5, 2023
8678be9
Apply suggestions from code review
0x4007 Dec 6, 2023
705238b
Merge pull request #58 from wannacfuture/refactor/general-deploy
0x4007 Dec 6, 2023
5a0787c
fix: dispatch params
0x4007 Dec 6, 2023
3b4be73
Revert "Refactor/general deploy"
0x4007 Dec 6, 2023
9f89bfd
fix: netlify commit hash
0x4007 Dec 6, 2023
16ae0af
Merge pull request #59 from pavlovcik/revert-58-refactor/general-deploy
0x4007 Dec 6, 2023
12cd2c7
fix: load env
0x4007 Dec 6, 2023
8c74da7
fix: netlify commit hash
0x4007 Dec 6, 2023
a7fa474
fix(build): fix some build errors
0x4007 Dec 6, 2023
212f6e9
chore: hack to get this into production faster
0x4007 Dec 6, 2023
00f6113
fix: commit hash render on build
0x4007 Dec 6, 2023
5313a61
fix: commit command
0x4007 Dec 6, 2023
7ab24dc
Update knip.yml to use knip-reporter v2.1.2 and node 20.x
gitcoindev Dec 6, 2023
8afedb2
Merge branch 'feat/logger-fatal' into refactor/general
0x4007 Dec 7, 2023
203ef5a
fix: delegate compute message level
0x4007 Dec 7, 2023
5b9bfe4
fix: ok log level to info level
0x4007 Dec 7, 2023
537880f
fix: minor missing info
0x4007 Dec 7, 2023
f266af9
chore: webhook cleaning
0x4007 Dec 7, 2023
4422df2
fix: build hash
0x4007 Dec 7, 2023
46175c7
fix: lint-staged
0x4007 Dec 7, 2023
4272ef5
fix: compute repo name
0x4007 Dec 7, 2023
7961254
fix(logs): always log to supabase
0x4007 Dec 8, 2023
3bdad28
refactor: remove unused log levels
0x4007 Dec 8, 2023
e984244
chore: debug validation error
0x4007 Dec 8, 2023
07ce845
fix: unassign handler but root cause not diagnosed
0x4007 Dec 8, 2023
678dcb9
feat: switch logging to ubiquibot-logging NPM module
gitcoindev Dec 8, 2023
c4c5986
feat: enable pretty logs import with ubiquity-logger v0.3.0
gitcoindev Dec 8, 2023
3ca8fad
Merge pull request #60 from gitcoindev/refactor-general-with-npm-logging
0x4007 Dec 9, 2023
dbb5d58
refactor: move to delegated compute
0x4007 Dec 10, 2023
579c447
refactor: prefix types with github to avoid typename collisions
0x4007 Dec 11, 2023
1a9e668
chore: switch knip-reporter to latest upstream release
gitcoindev Dec 11, 2023
ac3c2a4
chore: set node LTS and knip v2 tag
gitcoindev Dec 11, 2023
db96aca
feat: nft rewards
whilefoo Dec 11, 2023
06b3981
fix: remove console log
whilefoo Dec 11, 2023
2243c38
chore: use Codex-/knip-reporter
gitcoindev Dec 11, 2023
684b16c
refactor: cleanup
0x4007 Dec 11, 2023
5f18483
fix: app permissions used instead of personal access token
0x4007 Dec 11, 2023
ee51fb8
refactor: remove unnecessary code
0x4007 Dec 13, 2023
e23ccee
chore: add debugging logs
0x4007 Dec 13, 2023
05a143c
refactor: rename assign to start and unassign to stop
0x4007 Dec 13, 2023
6e33815
chore: debugging
0x4007 Dec 13, 2023
f81336a
chore: debugging
0x4007 Dec 13, 2023
ae4e785
chore: debugging
0x4007 Dec 13, 2023
fb9bf8e
chore: debugging
0x4007 Dec 13, 2023
0d664be
chore: debugging add netlify cli
0x4007 Dec 13, 2023
4fe47ba
chore: debugging
0x4007 Dec 13, 2023
056bb8c
feat(deps): add netlify logs
0x4007 Dec 13, 2023
613ec72
chore(logs): add metadata always
0x4007 Dec 13, 2023
a7def78
chore: enable source maps for netlify webhook for debugging
0x4007 Dec 13, 2023
41d8f72
chore: remove huge log
0x4007 Dec 13, 2023
115a103
fix: type error for build
0x4007 Dec 13, 2023
3ee39e0
chore: check necessary environment variables
0x4007 Dec 14, 2023
970419c
chore: upgrade knip to v3.7 with dev depencies typescript 5.0.4 and
gitcoindev Dec 14, 2023
1b38997
refactor: break apart unassign logic
0x4007 Dec 15, 2023
ef47ed8
fix: continue searching for assignees to disqualify
0x4007 Dec 15, 2023
ddd452f
refactor: rename files
0x4007 Dec 15, 2023
7d3e75c
refactor: move functions to where they are used
0x4007 Dec 15, 2023
2f117c4
chore: add penalty placeholder for issue reopened
0x4007 Dec 15, 2023
75c3cc9
feat: check if wallet is set before allowing start
0x4007 Dec 15, 2023
42cced8
feat: add more github events to enum
0x4007 Dec 15, 2023
f8f6b52
fix: build error
0x4007 Dec 15, 2023
4f15f0f
feat: extracted every github webhook type from probot
0x4007 Dec 15, 2023
0aef637
fix: build errors
0x4007 Dec 15, 2023
98699d4
feat: pass less info
wannacfuture Dec 18, 2023
437d144
refactor: move github events
0x4007 Dec 20, 2023
84ceea8
Merge branch 'refactor/general-deploy' into refactor/move-to-delegate…
0x4007 Dec 20, 2023
5e75f9d
chore: hack for probot to authenticate
0x4007 Dec 21, 2023
02ac3b0
chore: rename APP_PRIVATE_KEY to PRIVATE_KEY for probot
0x4007 Dec 21, 2023
b253789
fix: dispatcher use current organization
0x4007 Dec 21, 2023
920a334
chore: debugging duplicate events
0x4007 Dec 21, 2023
2d9dd4a
fix: debugging duplicate events
0x4007 Dec 21, 2023
4e888c7
fix: double events
0x4007 Dec 21, 2023
3006a9a
fix: build
0x4007 Dec 21, 2023
a274d53
fix: build
0x4007 Dec 21, 2023
7670cbd
chore: upgrade yarn
0x4007 Dec 23, 2023
4aaf216
fix: ping assignees for deadline
0x4007 Dec 23, 2023
37ee2d3
refactor: remove redundant value organization
0x4007 Dec 23, 2023
4c15837
feat: dedicated plugin stored at ubiquibot org
0x4007 Dec 23, 2023
62ed94a
feat: enable repository authentication from remote via github app
0x4007 Dec 23, 2023
abf320c
refactor: type casting for installation id
0x4007 Dec 23, 2023
99408aa
Merge remote-tracking branch 'pavlovcik/refactor/general' into nft-re…
whilefoo Dec 30, 2023
a703491
feat: update ubiquibot logger and fix start command
whilefoo Dec 31, 2023
95bcbdc
Merge pull request #57 from gitcoindev/knip-ci
0x4007 Jan 6, 2024
30fafc9
feat: fix pricing issue
wannacfuture Jan 9, 2024
714ea60
Merge pull request #63 from pavlovcik/refactor/general-deploy-pricing…
0x4007 Jan 15, 2024
0e4efb0
feat: remove private key from netlify env
wannacfuture Jan 16, 2024
85177d0
Merge pull request #64 from wannacfuture/refactor/remove-25519key-fro…
0x4007 Jan 16, 2024
626cae8
chore: almost done merging
0x4007 Jan 16, 2024
3014776
chore: merge
0x4007 Jan 16, 2024
841b18c
Merge branch 'ubiquity-whilefoo-nft-rewards' into refactor/move-to-de…
0x4007 Jan 16, 2024
eefbee9
feat: fix duplication price label issue
wannacfuture Jan 19, 2024
1060f00
Merge pull request #65 from wannacfuture/feat/fix-label-issues
0x4007 Jan 19, 2024
8aaf055
feat: fix build errors
wannacfuture Jan 22, 2024
19ec41c
feat: fix CI erros
wannacfuture Jan 23, 2024
f87a896
Update build.yml
wannacfuture Jan 23, 2024
136b11d
Update build.yml
wannacfuture Jan 23, 2024
73c5781
feat: minor change
wannacfuture Jan 23, 2024
fa4c9b9
Update build.yml
wannacfuture Jan 23, 2024
f16bf6d
feat: update build.yml
wannacfuture Jan 23, 2024
7fbd280
Update build.yml
wannacfuture Jan 23, 2024
d0d4230
feat: update build.yml
wannacfuture Jan 23, 2024
6b29125
Update build.yml
wannacfuture Jan 23, 2024
9d3c91c
feat: update
wannacfuture Jan 23, 2024
ed835da
Merge pull request #67 from wannacfuture/feat/fix-label-issues
0x4007 Jan 23, 2024
663138c
feat: remove axios call
wannacfuture Jan 29, 2024
beb5c9f
Merge pull request #68 from wannacfuture/refactor/remove-axios-call
0x4007 Jan 29, 2024
9bc1583
Revert "feat: remove axios call"
0x4007 Feb 2, 2024
e402d16
Merge pull request #69 from pavlovcik/revert-68-refactor/remove-axios…
0x4007 Feb 2, 2024
b85d27a
Merge branch 'refactor/move-to-delegated-compute' into development
0x4007 Feb 17, 2024
56a30fd
Merge remote-tracking branch 'upstream/development' into HEAD
0x4007 Feb 17, 2024
223c998
Merge branch 'development' into refactor/general
0x4007 Feb 17, 2024
5990267
chore: migrate to bun
0x4007 Feb 17, 2024
17e3cdb
fix: bun version
0x4007 Feb 17, 2024
3e7d129
fix: build command
0x4007 Feb 17, 2024
5687aa1
fix: build command
0x4007 Feb 17, 2024
29de0ee
fix: install toolchain
0x4007 Feb 17, 2024
32db575
chore: lint errors
0x4007 Feb 17, 2024
7e5e6ec
chore: try to fix knip
0x4007 Feb 17, 2024
0c3a364
chore: adjustments
0x4007 Feb 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
17 changes: 1 addition & 16 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +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
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

# Telegram Log Notification Envs
LOG_WEBHOOK_BOT_URL= # URL of cloudflare worker without trailing /
LOG_WEBHOOK_SECRET= # Random Secret, Shared between the telegram bot and the sender
LOG_WEBHOOK_GROUP_ID= # Group Id, ex: -100124234325
LOG_WEBHOOK_TOPIC_ID= # Topic Id (Optional), Only provide if group is a topic and you're not using General
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
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: "Bounty Proposal"
name: "Task Proposal"
description: Have a suggestion for how to improve UbiquiBot? Let us know!
title: "Bounty Proposal: "
title: "Task Proposal: "

body:
- type: markdown
attributes:
value: |
## Feature Request Form
Thank you for taking the time to file a feature request.
If you register your wallet address, you will be eligible for compensation if this is accepted!
Thank you for taking the time to file a feature request.
If you register your wallet address, you will be eligible for compensation if this is accepted!
Please let us know how we can improve the bot.

- type: textarea
Expand All @@ -17,14 +17,14 @@ body:
description: Please let us know what inspired you to write this proposal. Backlinking to specific comments on GitHub, and leaving a remark about how the bot should have interacted with it is usually sufficient context.
validations:
required: false

- type: textarea
attributes:
label: Describe the solution
description: A clear description of what you want to happen. Add any considered drawbacks.
validations:
required: true

- type: textarea
attributes:
label: Remarks
Expand Down
9 changes: 0 additions & 9 deletions .github/ubiquibot-config.yml

This file was deleted.

11 changes: 6 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand All @@ -16,13 +17,13 @@ jobs:
node-version: "20.10.0"

- name: Install
run: yarn install
run: npm install -g bun && bun install

- name: Local Build
run: yarn build
run: bun tsc

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

run-migration:
runs-on: ubuntu-latest
Expand All @@ -31,7 +32,7 @@ jobs:
env:
SUPABASE_ACCESS_TOKEN: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SUPABASE_ACCESS_TOKEN || secrets.STAGING_SUPABASE_ACCESS_TOKEN }}
SUPABASE_DB_PASSWORD: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SUPABASE_DB_PASSWORD || secrets.STAGING_SUPABASE_DB_PASSWORD }}
PROJECT_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SUPABASE_PROJECT_ID || secrets.STAGING_SUPABASE_PROJECT_ID }}
SUPABASE_PROJECT_ID: ${{ github.ref == 'refs/heads/main' && secrets.PRODUCTION_SUPABASE_PROJECT_ID || secrets.STAGING_SUPABASE_PROJECT_ID }}

steps:
- name: Checkout repository
Expand All @@ -42,7 +43,7 @@ jobs:
version: latest

- name: Link Supabase project
run: supabase link --project-ref $PROJECT_ID
run: supabase link --project-ref $SUPABASE_PROJECT_ID

- name: Run migrations
run: supabase db push
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@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20.10.0"

- name: Install
run: npm install bun -g && bun install

- name: Build
run: bun tsc

- 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: "bun test"
7 changes: 5 additions & 2 deletions .github/workflows/kebab-case.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ jobs:
"^\.\/vendor"
"^\.\/test"
"^\.\/\.next"
"^\.\/tests"
"\.sql$"
"\.md$"
"\.d.ts$"
"\.d\.ts$"
"\.gitignore$" # Ignore .gitignore files
"\.test\.ts$" # Ignore .test.ts files
)
while read -r file; do
basefile=$(basename "$file")
Expand All @@ -48,4 +51,4 @@ jobs:
echo " - $file"
done
exit 1
fi
fi
30 changes: 30 additions & 0 deletions .github/workflows/knip.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Knip

on:
pull_request:

permissions: write-all

jobs:
run-knip:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.10.0

- name: Install toolchain
run: npm install -g bun && bun install

- name: Report knip results to pull request
uses: Codex-/knip-reporter@v2
with:
verbose: true
comment_id: ${{ github.workflow }}-reporter
command_script_name: knip-ci
annotations: true
ignore_results: false
32 changes: 0 additions & 32 deletions .github/workflows/release.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 {} \;
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ supabase/temp
# Local Netlify folder
.netlify
bin
.yarn
.yarn
yarn-error.log
tsconfig.tsbuildinfo
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn commitlint --edit $1
bun commitlint --edit "$1"
5 changes: 3 additions & 2 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/sh
#!/usr/bin/env sh
. "$(dirname "$0")/_/husky.sh"

yarn lint-staged --verbose
# Run lint-staged first
bun lint-staged --verbose
Loading
Loading