Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/graphql pr fetch #2

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
417 commits
Select commit Hold shift + click to select a range
f7ad975
feat: set default erc20 reward param to WXDAI
rndquu Jul 4, 2024
48eeb02
Merge pull request #40 from rndquu/feat/custom-erc20-reward
rndquu Jul 5, 2024
5b2f8cc
Merge branch 'development' into feat/permit-fees
rndquu Jul 5, 2024
b7154c4
feat: subtract fees
rndquu Jul 5, 2024
9abe8d3
chore(development): release 1.1.0
github-actions[bot] Jul 7, 2024
a882ecb
Merge pull request #49 from ubiquibot/release-please--branches--devel…
gentlementlegen Jul 7, 2024
b556238
feat: reward is now split if there are multiple assignees
gentlementlegen Jul 7, 2024
566185b
chore: test for reward splitting
gentlementlegen Jul 7, 2024
f839823
chore: fix cspell
gentlementlegen Jul 7, 2024
170cdcc
fix: assignees are added to the reward even without commenting
gentlementlegen Jul 8, 2024
615d221
fix: users with no comment now can see their issue task on multiple a…
gentlementlegen Jul 8, 2024
b945a25
chore: fixed unit tests
gentlementlegen Jul 8, 2024
0474cb3
chore: fixed unit tests
gentlementlegen Jul 8, 2024
c709a07
chore: fixed unit tests
gentlementlegen Jul 8, 2024
995ee53
chore: fixed unit tests
gentlementlegen Jul 8, 2024
c67cc4b
chore: fixed unit tests
gentlementlegen Jul 8, 2024
5363fe7
chore: removed log
gentlementlegen Jul 8, 2024
25fb6d9
chore: fix tests
gentlementlegen Jul 8, 2024
761a656
chore: fixed precision for assignee count division
gentlementlegen Jul 8, 2024
30b0c38
chore: fixed precision for assignee count division
gentlementlegen Jul 8, 2024
7d3a2b6
Merge pull request #51 from ubiquibot/testing/ubiquibot-v2-testing
gentlementlegen Jul 8, 2024
0533eba
feat: added ubiquibot logger
gentlementlegen Jul 9, 2024
a5f5a1d
Merge branch 'refs/heads/development' into meniole-main
gentlementlegen Jul 9, 2024
45b5abb
chore: test comment
gentlementlegen Jul 9, 2024
d43d96c
chore: test comment
gentlementlegen Jul 9, 2024
16c78e3
chore: test comment
gentlementlegen Jul 9, 2024
474c55e
chore: test comment
gentlementlegen Jul 9, 2024
d514d4a
chore: test comment
gentlementlegen Jul 9, 2024
32510dc
chore: test comment
gentlementlegen Jul 9, 2024
bb69c65
chore: test comment
gentlementlegen Jul 9, 2024
322b915
chore: test comment
gentlementlegen Jul 9, 2024
0993b96
chore: test comment
gentlementlegen Jul 9, 2024
e1437ae
chore: test comment
gentlementlegen Jul 9, 2024
d8e190c
chore: test comment
gentlementlegen Jul 9, 2024
0851f32
chore: test comment
gentlementlegen Jul 9, 2024
b92e254
chore: test comment
gentlementlegen Jul 9, 2024
8961e3d
chore: test comment
gentlementlegen Jul 9, 2024
995a4f5
chore: test comment
gentlementlegen Jul 9, 2024
1650647
chore: test comment
gentlementlegen Jul 9, 2024
44e98a0
chore: test comment
gentlementlegen Jul 9, 2024
352bd32
chore: test comment
gentlementlegen Jul 9, 2024
65519cb
chore: test comment
gentlementlegen Jul 9, 2024
9c89229
chore: test comment
gentlementlegen Jul 9, 2024
bd38e30
chore: test comment
gentlementlegen Jul 9, 2024
02ae80c
chore: test comment
gentlementlegen Jul 9, 2024
c47ba4d
chore: fixed CI
gentlementlegen Jul 9, 2024
8bb0dd6
chore: fixed CI
gentlementlegen Jul 9, 2024
c8bd3f3
chore: updated README.md to match the schema
gentlementlegen Jul 9, 2024
4732329
chore: updated README.md to match the schema
gentlementlegen Jul 9, 2024
9069d3f
chore: renamed task multiplier function
gentlementlegen Jul 10, 2024
28a6e40
Merge pull request #50 from gentlementlegen/feat/reward-splitting
gentlementlegen Jul 10, 2024
5800938
Merge branch 'ubiquibot:development' into development
gentlementlegen Jul 10, 2024
bfc85da
chore(development): release 1.2.0
github-actions[bot] Jul 10, 2024
00dbd3a
test: add permit fee tests
rndquu Jul 10, 2024
2aef967
Merge branch 'development' into feat/permit-fees
rndquu Jul 10, 2024
9318652
feat: added ubiquibot logger
gentlementlegen Jul 9, 2024
628db1c
chore: removed unused directive in tsconfig.json
gentlementlegen Jul 10, 2024
7a5ba72
chore: removed ts extensions on imports
gentlementlegen Jul 10, 2024
d2ff558
test: add test for empty PERMIT_FEE_RATE
rndquu Jul 10, 2024
0e84240
ci(test): add fee env variables
rndquu Jul 10, 2024
866f853
chore: added comment on COMMENT_ID
gentlementlegen Jul 11, 2024
ccd3c3c
test: mock supabase
rndquu Jul 11, 2024
cd752b7
Merge pull request #52 from gentlementlegen/development
gentlementlegen Jul 11, 2024
101d176
fix: set specs relevance as 1
EresDev Jul 11, 2024
e45b610
chore: manifest.json
gentlementlegen Jul 12, 2024
05e19bf
fix: resolve conflicts
rndquu Jul 12, 2024
9ae0e17
refactor: remove default value from PERMIT_FEE_RATE
rndquu Jul 12, 2024
6e09210
fix: do not apply fee to user.total
rndquu Jul 12, 2024
2a9f0ef
Revert "fix: do not apply fee to user.total"
rndquu Jul 12, 2024
0206639
fix: remove unnecessary toFixed()
rndquu Jul 12, 2024
264869f
fix: improve specification comment identification
EresDev Jul 12, 2024
395d154
test: update relevance for evalulator output
EresDev Jul 12, 2024
63b9201
test: update relevance for github comment output
EresDev Jul 12, 2024
2e5c541
test: update relevance for permit generator output
EresDev Jul 12, 2024
725e060
chore: ignore test outputs formatting by prettier
EresDev Jul 12, 2024
b90e8c6
test: update relevance for reward split output
EresDev Jul 12, 2024
77ce558
chore: spell fix
EresDev Jul 12, 2024
dad384f
Merge pull request #54 from ubiquibot/release-please--branches--devel…
gentlementlegen Jul 15, 2024
7af3266
chore(development): release 1.2.0
github-actions[bot] Jul 10, 2024
bf0d08a
fix: removed enabled setting from configuration
gentlementlegen Jul 15, 2024
97a1a38
Merge pull request #43 from rndquu/feat/permit-fees
rndquu Jul 15, 2024
cc9851e
chore: renamed pull and author
gentlementlegen Jul 15, 2024
a22defd
fix: include missing h5 and other html tags
EresDev Jul 15, 2024
1ca68d0
test: update expected output for missing html tags
EresDev Jul 15, 2024
f0d382f
chore: manifest.json
gentlementlegen Jul 16, 2024
fcdd1d9
chore: manifest.json
gentlementlegen Jul 16, 2024
465d554
chore: updated documentation and defaults
gentlementlegen Jul 16, 2024
3815eac
chore: use logger for error
gentlementlegen Jul 16, 2024
f833afa
chore: debug context
gentlementlegen Jul 16, 2024
87dd667
chore: metadata in comment
gentlementlegen Jul 16, 2024
ba993e0
chore: fix metadata line breaks
gentlementlegen Jul 16, 2024
7f21c42
chore: test throw error
gentlementlegen Jul 16, 2024
ca5e016
chore: error formatting
gentlementlegen Jul 16, 2024
2e6f0ed
chore: removed fake error
gentlementlegen Jul 16, 2024
bb3de97
chore: added related test to metadata posting
gentlementlegen Jul 16, 2024
8158daa
Merge branch 'refs/heads/meniole-main' into fix/configuration-improve…
gentlementlegen Jul 16, 2024
653501c
chore: test fixing
gentlementlegen Jul 16, 2024
8a85842
chore: test fixing
gentlementlegen Jul 16, 2024
fcdfbb7
chore: test fixing
gentlementlegen Jul 16, 2024
2a0c98a
chore: added log for test
gentlementlegen Jul 16, 2024
2622106
chore: added log for test
gentlementlegen Jul 16, 2024
ac95cfd
chore: updated output test
gentlementlegen Jul 16, 2024
07115f4
chore: updated output test
gentlementlegen Jul 16, 2024
41b49da
chore: updated output test
gentlementlegen Jul 16, 2024
234850d
chore: updated output test
gentlementlegen Jul 16, 2024
590841a
chore: updated output test
gentlementlegen Jul 16, 2024
bc08034
chore: updated output test
gentlementlegen Jul 16, 2024
e8474b3
Merge pull request #59 from gentlementlegen/feat/error-reporting
gentlementlegen Jul 17, 2024
870063c
Merge branch 'refs/heads/development' into fix/configuration-improvem…
gentlementlegen Jul 18, 2024
a0cc8a4
feat: changed configuration for rewards
gentlementlegen Jul 18, 2024
cef7b11
chore: test fix
gentlementlegen Jul 18, 2024
8a5a3ef
fix: score as 0 for unlisted html tags
EresDev Jul 18, 2024
4e6ae91
test: update output for unlisted html tags
EresDev Jul 18, 2024
b2d962e
chore: content evaluator optional
gentlementlegen Jul 18, 2024
7ef03ae
chore: updated valid configuration test file
gentlementlegen Jul 18, 2024
ab853f8
chore: updated configuration types
gentlementlegen Jul 18, 2024
acf4c17
chore: made type human-readable for GitHub comment
gentlementlegen Jul 18, 2024
6d6ea75
chore: updated test result
gentlementlegen Jul 18, 2024
a89fffd
feat: retry to fetch on error
gentlementlegen Jul 19, 2024
d1a5cb4
chore: accept null for configuration
gentlementlegen Jul 19, 2024
82d75fe
chore: removed post on failed attempts
gentlementlegen Jul 19, 2024
26a0bed
feat: configuration for data collection
gentlementlegen Jul 19, 2024
50f499e
chore: added tests for retry
gentlementlegen Jul 19, 2024
9144368
chore: added tests for retry
gentlementlegen Jul 19, 2024
69cb9b5
chore: rename maxTry and delay
gentlementlegen Jul 19, 2024
6d8bd23
Merge pull request #63 from gentlementlegen/feat/exponential-backoff
gentlementlegen Jul 19, 2024
f75d842
Merge branch 'refs/heads/development' into fix/configuration-improvem…
gentlementlegen Jul 21, 2024
c6050d4
chore: format with prettier
EresDev Jul 22, 2024
0c063a8
feat: prompt openai for json response
EresDev Jul 22, 2024
cd5b4d0
Merge branch 'development' of https://github.com/ubiquibot/conversati…
EresDev Jul 22, 2024
708db4e
fix: set relevance as 1 on chatgpt failure
EresDev Jul 23, 2024
93ccc25
feat: html score is now based per select item
gentlementlegen Jul 23, 2024
6bdd49f
feat: retry plugin
whilefoo Jul 23, 2024
baf7746
chore: fixed tests
gentlementlegen Jul 23, 2024
d53060f
feat: retry configuration
whilefoo Jul 23, 2024
44904a9
chore: fixed tests
gentlementlegen Jul 23, 2024
45489d3
feat: multipliers are based on symbols representing a regex
gentlementlegen Jul 23, 2024
4689208
refactor: identify specification of issue
EresDev Jul 23, 2024
4d574b8
fix: set review comments relevance as 1
EresDev Jul 23, 2024
9f8815e
chore: fixed spells
EresDev Jul 23, 2024
16d6c61
feat: add relevance config for content evaluator
EresDev Jul 23, 2024
6f014f4
docs: add relevance config to readme
EresDev Jul 23, 2024
c345948
chore: fixing tests
gentlementlegen Jul 24, 2024
a372bab
chore: fixing tests
gentlementlegen Jul 24, 2024
5046c14
chore: fixing tests
gentlementlegen Jul 24, 2024
39bd186
chore: fixing tests
gentlementlegen Jul 24, 2024
c92d0a5
chore: fixing tests
gentlementlegen Jul 24, 2024
6a4d9f6
chore: fixing tests
gentlementlegen Jul 24, 2024
eca0aa0
chore: fixing tests
gentlementlegen Jul 24, 2024
d170c9f
chore: fixing tests
gentlementlegen Jul 24, 2024
b8c83c0
chore: fixing tests
gentlementlegen Jul 24, 2024
c2e9443
chore: updated README.md
gentlementlegen Jul 24, 2024
5f9cf62
refactor: rename variables & functions
EresDev Jul 24, 2024
a0fa350
fix: number conversion
whilefoo Jul 24, 2024
292cca5
test: use correct expected output
EresDev Jul 24, 2024
b49f619
chore: removed undefined for configuration items
gentlementlegen Jul 26, 2024
1f62fc1
chore: fix tests
gentlementlegen Jul 26, 2024
1aa9f3a
chore: fix tests
gentlementlegen Jul 26, 2024
d862d53
Merge pull request #58 from gentlementlegen/fix/configuration-improve…
gentlementlegen Jul 26, 2024
44bb136
chore: merge develop
gentlementlegen Jul 26, 2024
6a9361f
chore: default configuration to null
gentlementlegen Jul 26, 2024
23bc825
chore: fixed README.md and infinite division
gentlementlegen Jul 26, 2024
73458ba
chore: updated README.md
gentlementlegen Jul 26, 2024
5ec57f7
chore: changed total count
gentlementlegen Jul 26, 2024
1e5aedb
chore: optional formatting evaluator
gentlementlegen Jul 26, 2024
1e42677
chore: log configuration
gentlementlegen Jul 26, 2024
5717dc3
chore: log configuration
gentlementlegen Jul 26, 2024
8bf00cc
chore: null defaults for configuration
gentlementlegen Jul 26, 2024
7a64286
chore: null defaults for configuration
gentlementlegen Jul 26, 2024
e92faf0
Merge branch 'refs/heads/feat/symbol-coefficient' into fix/undefined-…
gentlementlegen Jul 26, 2024
af63549
chore: changed error message for module configuration
gentlementlegen Jul 26, 2024
b9e093a
Merge remote-tracking branch 'origin/development' into retry
whilefoo Jul 26, 2024
c4d273e
chore: add {}
whilefoo Jul 27, 2024
9c776e5
fix: error comment
whilefoo Jul 27, 2024
6791fed
feat: fixed error, added test
whilefoo Jul 28, 2024
5bde793
fix: mock
whilefoo Jul 28, 2024
b02ee29
fix: mock
whilefoo Jul 28, 2024
dd64253
fix: mock
whilefoo Jul 28, 2024
33bb5d9
feat: add test
whilefoo Jul 28, 2024
80609d2
Merge pull request #67 from ubiquibot/retry
whilefoo Jul 29, 2024
c155eed
Merge branch 'development' into feat/symbol-coefficient
gentlementlegen Jul 29, 2024
027af97
chore: fix merge
gentlementlegen Jul 29, 2024
087090e
docs: remove redundent info
EresDev Jul 30, 2024
20f123d
chore: removed default configuration merging
gentlementlegen Jul 30, 2024
89237e6
Update src/configuration/incentives.ts
gentlementlegen Jul 30, 2024
64f2f57
refactor: rename variable type to commentType
EresDev Jul 30, 2024
7d6a75b
refactor: remove redundent typecast commentType
EresDev Jul 30, 2024
3835202
fix: stop evaluataion on openai failure
EresDev Jul 30, 2024
f468888
fix: use typebox to validate openai response
EresDev Jul 30, 2024
0eb37d3
Merge branch 'development' of https://github.com/ubiquibot/conversati…
EresDev Jul 30, 2024
453eac9
chore: log openai response
EresDev Jul 30, 2024
324234f
fix: replace console logs with logger
EresDev Jul 31, 2024
135105d
fix: use decimal correctly get correct floating point
EresDev Jul 31, 2024
8ea2713
fix: linked PRs are properly collected
gentlementlegen Aug 4, 2024
6b512c5
fix: the metadata is properly escaped to avoid html rendering
gentlementlegen Aug 4, 2024
7206411
fix: content preview is properly stripped down to 64 characters
gentlementlegen Aug 4, 2024
92cbfb1
chore: removed logs
gentlementlegen Aug 4, 2024
de942ee
chore: removed logs
gentlementlegen Aug 4, 2024
ee14b90
fix: comments are ignored for the final result
gentlementlegen Aug 4, 2024
238f4d0
chore: fix test split reward
gentlementlegen Aug 5, 2024
0917a07
chore: fix test github comment
gentlementlegen Aug 5, 2024
20bd994
chore: merged fixes
gentlementlegen Aug 5, 2024
50a4380
Merge pull request #1 from gentlementlegen/fork/test
EresDev Aug 5, 2024
c0c5ce7
docs: give correct reason for default relevance
EresDev Aug 12, 2024
ac4b164
refactor: improve typebox types usage
EresDev Aug 12, 2024
369d614
Merge pull request #55 from EresDevOrg/development
gentlementlegen Aug 13, 2024
f892bc9
Merge branch 'development' into feat/symbol-coefficient
gentlementlegen Aug 15, 2024
61f8ec0
chore: new schema (WIP)
gentlementlegen Aug 15, 2024
6749a5f
Merge branch 'fix/undefined-configuration' into feat/symbol-coefficient
gentlementlegen Aug 15, 2024
5117a4f
chore: fixed mock for valid configuration
gentlementlegen Aug 15, 2024
90bc3a8
chore: fix tests for split reward
gentlementlegen Aug 15, 2024
c11ebc3
chore: fix tests
gentlementlegen Aug 15, 2024
db0b6ec
chore: added default missing objects in README.md
gentlementlegen Aug 18, 2024
8b55fbf
chore: bumped packages
gentlementlegen Aug 20, 2024
6132345
fix: increased max tokens for ChatGpt based on the prompt
gentlementlegen Aug 20, 2024
afd39a8
chore: reduced max tokens to 4096
gentlementlegen Aug 20, 2024
fc291ef
chore: test changing top_p
gentlementlegen Aug 20, 2024
62bc83e
Merge pull request #86 from gentlementlegen/fix/bump-package
0x4007 Aug 20, 2024
4e315ad
chore: changed max token calculation
gentlementlegen Aug 20, 2024
d3144a0
chore: added debug logs
gentlementlegen Aug 20, 2024
15fa9f6
chore: added debug logs
gentlementlegen Aug 20, 2024
9857818
chore: added debug logs
gentlementlegen Aug 20, 2024
1b82e33
chore: added debug logs
gentlementlegen Aug 20, 2024
a696656
chore: removed debug
gentlementlegen Aug 20, 2024
303e92f
chore: removed unused await
gentlementlegen Aug 20, 2024
a39fa23
chore: updated open AI version
gentlementlegen Aug 20, 2024
31cb560
Merge pull request #87 from gentlementlegen/fix/truncated-response
gentlementlegen Aug 20, 2024
6b6698b
fix: waiting message is only displayed on issue completed
gentlementlegen Aug 23, 2024
c340ba4
Merge pull request #93 from gentlementlegen/fix/waiting-message
0x4007 Aug 23, 2024
4de373f
feat: changed pull-request by graphql
gentlementlegen Aug 25, 2024
ff382a1
chore: test less items query
gentlementlegen Aug 25, 2024
1a2553b
chore: remove openai call for testing
gentlementlegen Aug 25, 2024
6dc37c3
chore: added gql pagination
gentlementlegen Aug 25, 2024
591f452
chore: removed comment evaluation dummy
gentlementlegen Aug 25, 2024
1c41c93
chore: removed closed PRs
gentlementlegen Aug 25, 2024
1690418
chore: removed unused code
gentlementlegen Aug 25, 2024
06220db
chore: fixed knip
gentlementlegen Aug 25, 2024
59924d5
chore: test fix (WIP)
gentlementlegen Aug 26, 2024
9b4a22a
Merge branch 'development' into feat/graphql-pr-fetch
gentlementlegen Aug 26, 2024
dae0b4d
Merge pull request #68 from gentlementlegen/feat/symbol-coefficient
gentlementlegen Aug 26, 2024
3e673f1
Merge branch 'refs/heads/development' into feat/graphql-pr-fetch
gentlementlegen Aug 26, 2024
5ae0feb
chore: test fix (WIP)
gentlementlegen Aug 26, 2024
2cdb427
chore: test fix (WIP)
gentlementlegen Aug 26, 2024
ac0c2fe
chore: test fix (WIP)
gentlementlegen Aug 26, 2024
ada5be8
chore: test fix (WIP)
gentlementlegen Aug 26, 2024
d636208
chore: test fix (WIP)
gentlementlegen Aug 26, 2024
09ada15
chore: removed logs and downgraded permit generator
gentlementlegen Aug 26, 2024
0b2bf07
chore: fixed test
gentlementlegen Aug 26, 2024
313f11b
feat: only extracting the last pull request
gentlementlegen Aug 26, 2024
67cfc61
chore: fix last pr issue
gentlementlegen Aug 26, 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: 2 additions & 2 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
"ignorePaths": ["**/*.json", "**/*.css", "node_modules", "**/*.log", "**/tests/__mocks__"],
"ignorePaths": ["**/*.json", "**/*.css", "node_modules", "**/*.log", "**/tests/**"],
"useGitignore": true,
"language": "en",
"words": ["dataurl", "devpool", "outdir", "servedir", "ubiquibot", "tiktoken", "typebox", "supabase", "wxdai", "noopener", "knip", "hellip"],
"words": ["dataurl", "devpool", "outdir", "servedir", "ubiquibot", "tiktoken", "typebox", "supabase", "wxdai", "noopener", "knip", "hellip", "mswjs"],
"dictionaries": ["typescript", "node", "software-terms"],
"import": ["@cspell/dict-typescript/cspell-ext.json", "@cspell/dict-node/cspell-ext.json", "@cspell/dict-software-terms"],
"ignoreRegExpList": ["[0-9a-fA-F]{6}"]
Expand Down
6 changes: 6 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
GITHUB_TOKEN="<token>"
OPENAI_API_KEY="<api_key>"
# treasury fee applied to the final permits, ex: 100 = 100%, 0.1 = 0.1%
PERMIT_FEE_RATE=""
# github account associated with EVM treasury address allowed to claim permit fees, ex: "ubiquibot-treasury"
PERMIT_TREASURY_GITHUB_USERNAME=""
# comma separated list of token addresses which should not incur any fees, ex: "0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d, 0x4ECaBa5870353805a9F068101A40E0f32ed605C6"
PERMIT_ERC20_TOKENS_NO_FEE_WHITELIST=""
69 changes: 69 additions & 0 deletions .github/workflows/compute.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Compute Rewards

on:
workflow_dispatch:
inputs:
stateId:
description: "State Id"
eventName:
description: "Event Name"
eventPayload:
description: "Event Payload"
settings:
description: "Settings"
authToken:
description: "Auth Token"
ref:
description: "Ref"

jobs:
compute:
name: Rewards
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
X25519_PRIVATE_KEY: ${{ secrets.X25519_PRIVATE_KEY }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
NFT_MINTER_PRIVATE_KEY: ${{ secrets.NFT_MINTER_PRIVATE_KEY }}
NFT_CONTRACT_ADDRESS: ${{ secrets.NFT_CONTRACT_ADDRESS }}
PERMIT_FEE_RATE: ${{ secrets.PERMIT_FEE_RATE }}
PERMIT_TREASURY_GITHUB_USERNAME: ${{ secrets.PERMIT_TREASURY_GITHUB_USERNAME }}
PERMIT_ERC20_TOKENS_NO_FEE_WHITELIST: ${{ secrets.PERMIT_ERC20_TOKENS_NO_FEE_WHITELIST }}

steps:
- name: Post starting comment to issue
uses: actions/github-script@v7
id: post-comment
with:
github-token: ${{ inputs.authToken }}
script: |
const comment_body = '\`\`\`diff\n+ Evaluating results. Please wait...';
const obj = ${{ inputs.eventPayload }}
if (obj.issue && "${{ inputs.eventName }}" === "issues.closed" && obj.issue.state_reason === "completed") {
const response = await github.rest.issues.createComment({
owner: obj.repository.owner.login,
repo: obj.repository.name,
issue_number: obj.issue.number,
body: comment_body,
});
core.setOutput('comment_id', response.data.id);
}

- name: Set environment variable
run: echo "COMMENT_ID=${{ steps.post-comment.outputs.comment_id }}" >> $GITHUB_ENV

- run: ${{ toJSON(inputs) }}
shell: cat {0}

- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.10.0"

- name: Generate Rewards
uses: ./
43 changes: 19 additions & 24 deletions .github/workflows/jest-testing.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,40 @@
name: Run Jest Tests

name: Run Jest testing suite
on:
workflow_dispatch:
pull_request:

env:
NODE_ENV: "test"

jobs:
test:
testing:
permissions: write-all
name: Run Jest Tests
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
X25519_PRIVATE_KEY: ${{ secrets.X25519_PRIVATE_KEY }}
# Dummy values, not production ones!
X25519_PRIVATE_KEY: "wrQ9wTI1bwdAHbxk2dfsvoK1yRwDc0CEenmMXFvGYgY"
EVM_PRIVATE_ENCRYPTED: "kmpTKq5Wh9r9x5j3U9GqZr3NYnjK2g0HtbzeUBOuLC2y3x8ja_SKBNlB2AZ6LigXHP_HeMitftVUtzmoj8CFfVP9SqjWoL6IPku1hVTWkdTn97g1IxzmjydFxjdcf0wuDW1hvVtoq3Uw5yALABqxcQ"
NFT_MINTER_PRIVATE_KEY: ${{ secrets.NFT_MINTER_PRIVATE_KEY }}
NFT_CONTRACT_ADDRESS: ${{ secrets.NFT_CONTRACT_ADDRESS }}
EVM_PRIVATE_ENCRYPTED: ${{ secrets.EVM_PRIVATE_ENCRYPTED }}

PERMIT_FEE_RATE: ""
PERMIT_TREASURY_GITHUB_USERNAME: ""
PERMIT_ERC20_TOKENS_NO_FEE_WHITELIST: ""
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
- uses: actions/setup-node@v4
with:
node-version: "20.10.0"

- name: Install dependencies
run: yarn install
- uses: actions/checkout@master
with:
fetch-depth: 0

- name: Run tests
run: yarn test | tee ./coverage.txt && exit ${PIPESTATUS[0]}
- name: Jest With Coverage
run: yarn install --immutable --immutable-cache --check-cache && yarn test

- name: Jest Coverage Comment
# Ensures this step is run even on previous step failure (e.g. test failed)
- name: Add Jest Report to Summary
if: always()
uses: MishaKav/jest-coverage-comment@main
with:
coverage-summary-path: coverage/coverage-summary.json
junitxml-path: junit.xml
junitxml-title: JUnit
coverage-path: ./coverage.txt
run: echo "$(cat test-dashboard.md)" >> $GITHUB_STEP_SUMMARY
2 changes: 1 addition & 1 deletion .github/workflows/knip-reporter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:
jobs:
knip-reporter:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion != 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -35,7 +36,6 @@ jobs:
trim: true

- name: Report knip results to pull request
if: ${{ github.event.workflow_run.conclusion != 'success' }}
uses: gitcoindev/knip-reporter@main
with:
verbose: true
Expand Down
33 changes: 0 additions & 33 deletions .github/workflows/main.yml

This file was deleted.

8 changes: 6 additions & 2 deletions .github/workflows/release-please.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,15 @@ on:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v4
- uses: googleapis/release-please-action@v4
with:
release-type: simple
default-branch: main
target-branch: main
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ static/dist
.env
junit.xml
coverage
test-dashboard.md
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
output.html
tests/__mocks__/results/output-reward-split.html
75 changes: 75 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Changelog

## [1.2.0](https://github.com/ubiquibot/conversation-rewards/compare/v1.1.0...v1.2.0) (2024-07-10)


### Features

* reward is now split if there are multiple assignees ([b556238](https://github.com/ubiquibot/conversation-rewards/commit/b55623812633bc48760e07bbbd7a1c8f7509121d))


### Bug Fixes

* assignees are added to the reward even without commenting ([170cdcc](https://github.com/ubiquibot/conversation-rewards/commit/170cdcc694cf4499eb8210beff1a58885c99c5a4))
* users with no comment now can see their issue task on multiple assignees ([615d221](https://github.com/ubiquibot/conversation-rewards/commit/615d221bc1d0a8129f58e2c0ff5c06339d177792))

## [1.1.0](https://github.com/ubiquibot/conversation-rewards/compare/v1.0.0...v1.1.0) (2024-07-07)


### Features

* add erc20RewardToken config param ([2b53e68](https://github.com/ubiquibot/conversation-rewards/commit/2b53e6875178d8f4ead54a620dc13e0e5f8c2322))
* pass token address on permit generation ([6fd15dd](https://github.com/ubiquibot/conversation-rewards/commit/6fd15ddcdf71062f905a14ddf4c4dd5fe8051e38))
* set default erc20 reward param to WXDAI ([f7ad975](https://github.com/ubiquibot/conversation-rewards/commit/f7ad97538c7a5da1dfee37f309be4a2885847574))


### Bug Fixes

* resolve conflicts ([f8159e1](https://github.com/ubiquibot/conversation-rewards/commit/f8159e16d7988ba7346208fba8d18b25115fe4bb))
* updated test suite to match the new schema, fixed the async test to not run after tear down ([ca6e472](https://github.com/ubiquibot/conversation-rewards/commit/ca6e472511cbecad9a7b3ce7ba137e9c6b3ce3ff))

## 1.0.0 (2024-06-11)


### Features

* cli argument to pass the issue URL to the program ([d4e9116](https://github.com/ubiquibot/conversation-rewards/commit/d4e91169ffd22b0f3bd0c26adc5829391c37437f))
* collect all user events ([147ba83](https://github.com/ubiquibot/conversation-rewards/commit/147ba83525c8626ebfccae97c30f368e087f4029))
* command line parsing arguments ([af93229](https://github.com/ubiquibot/conversation-rewards/commit/af932291d1b17f535b2cc5e5c02ce2ad4cfe7028))
* configuration parser ([0e6f3d1](https://github.com/ubiquibot/conversation-rewards/commit/0e6f3d192713bf5803b82aa5c80f73d8fab0989a))
* formatting is evaluated and influences the final score ([45d2831](https://github.com/ubiquibot/conversation-rewards/commit/45d2831ffb0337a68d4d4280f6a550c12c712d68))
* **get-activity:** properly fetches everything according to test ([6e067f7](https://github.com/ubiquibot/conversation-rewards/commit/6e067f71b69f58f1f1391ccce522c67fafd8fb94))
* github app login ([f4f4896](https://github.com/ubiquibot/conversation-rewards/commit/f4f4896b8611acd53f61685a6774665b5dfb8928))
* github app login ([b2efc68](https://github.com/ubiquibot/conversation-rewards/commit/b2efc68d996d9202ff4bd6a3385e9922e8eda846))
* github app login ([df34aa7](https://github.com/ubiquibot/conversation-rewards/commit/df34aa71a1c36563f34a14ea1fb4220642332012))
* github app login ([8add964](https://github.com/ubiquibot/conversation-rewards/commit/8add9648f2717d71b6fb32b806fb97fd7cad800c))
* github app login ([ad16266](https://github.com/ubiquibot/conversation-rewards/commit/ad1626672a42d5e2ba3f6404cb51db6d233e0c9c))
* github app login ([013519d](https://github.com/ubiquibot/conversation-rewards/commit/013519d80fad987f7ca7bfb2774f7d5ed00d9468))
* github app login ([39fa39d](https://github.com/ubiquibot/conversation-rewards/commit/39fa39d58f38e984e3b3120d09338becef753e36))
* link pull request from issue (not other way around) ([e6aa979](https://github.com/ubiquibot/conversation-rewards/commit/e6aa97973e7b8bb64551bd060ab6e2e005b6d4d3))
* moved tsx to production dependencies ([423f49e](https://github.com/ubiquibot/conversation-rewards/commit/423f49e2dfaff1b8ca4603100cd89aa41b0b6e52))
* pass in token from kernel to authenticate octokit client ([1f4ba00](https://github.com/ubiquibot/conversation-rewards/commit/1f4ba009bd81b3cbea79e8cde1735407d0504037))
* permit generation module ([925243f](https://github.com/ubiquibot/conversation-rewards/commit/925243f8ac5cc847b4b63ac76195d0d3de3c9fed))
* permit generation module ([50b396b](https://github.com/ubiquibot/conversation-rewards/commit/50b396b26e1bec433f193481004a7db6505f5ba5))
* read inputs from GitHub inputs instead of CLI ([30ac759](https://github.com/ubiquibot/conversation-rewards/commit/30ac759a2e81633304f91ff127a7d6848af420d2))
* saving permit to database ([aecd4e1](https://github.com/ubiquibot/conversation-rewards/commit/aecd4e127e9341ae18c18b14bf7c1c5dc8f98a6b))
* untested class to get all information ([f5104e1](https://github.com/ubiquibot/conversation-rewards/commit/f5104e14034cf2b6174bff1c6d3669aa177e438c))
* untested class to get all information ([a86c62f](https://github.com/ubiquibot/conversation-rewards/commit/a86c62f67c48a129dcb904d6fd69663c9e847f0d))
* updated jest test workflow ([a69f8d9](https://github.com/ubiquibot/conversation-rewards/commit/a69f8d9c82a8316b90f4c9f14b177185ebefcb25))
* updated jest test workflow ([834f821](https://github.com/ubiquibot/conversation-rewards/commit/834f821b42079c30d8e194749e6538e2d5a17ceb))


### Bug Fixes

* all tests pass ([db1868e](https://github.com/ubiquibot/conversation-rewards/commit/db1868e60fe96ea9f8a30a347d40e1cac7c9e067))
* **ci:** auth ([e897fdb](https://github.com/ubiquibot/conversation-rewards/commit/e897fdb4c0bcaeecbd6b6445a85a58d26b613338))
* cspell ([890a4a4](https://github.com/ubiquibot/conversation-rewards/commit/890a4a4c250d40d99fb6e127664c02544eef0826))
* cspell ignore words ([1160614](https://github.com/ubiquibot/conversation-rewards/commit/11606142d26cbd57c7c33f9e08d0e0a6bab689d2))
* fixed path for evm values ([2f3c2ee](https://github.com/ubiquibot/conversation-rewards/commit/2f3c2ee229400031e1fd95324d91677eda84925e))
* more characters are escaped (backtick, ampersand) to avoid display issues ([550869c](https://github.com/ubiquibot/conversation-rewards/commit/550869c13e48e4bb2865acb629bed66b6a3ab1e6))
* permit generation is skipped if price label is missing (configurable) ([d59cb0a](https://github.com/ubiquibot/conversation-rewards/commit/d59cb0a93c50770ec946514627ca34406e3da2e0))
* remove build action and changed trigger for Jest testing ([146580e](https://github.com/ubiquibot/conversation-rewards/commit/146580efc68b6d8ccaf56ba3873bc2dead03bd68))
* skip on issue close not completed status ([2c15e7c](https://github.com/ubiquibot/conversation-rewards/commit/2c15e7c44ea878221cce0afba4b93ffa3f4da067))
* **test:** resolve promises ([9d57104](https://github.com/ubiquibot/conversation-rewards/commit/9d571040cc8219c23a506ff8809273b991058f49))
* **test:** resolve promises ([1d62274](https://github.com/ubiquibot/conversation-rewards/commit/1d62274efb1cafea37356cf7d59069a4413bc436))
* types ([c4ad907](https://github.com/ubiquibot/conversation-rewards/commit/c4ad90732a3ba25098866ecb09103d8b780f05c8))
Loading
Loading