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

Next Release Aug 2024 #1755

Merged
merged 513 commits into from
Aug 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
513 commits
Select commit Hold shift + click to select a range
3494a56
update qfRoundResolver.ts with new estimated matching structure
RamRamez Jun 17, 2024
196023f
update qfUtils.ts with new estimated matching structure
RamRamez Jun 17, 2024
360c144
add verified status
RamRamez Jun 17, 2024
16a9576
add minimumPassportScore to getProjectQfRoundStats
RamRamez Jun 17, 2024
258e5d4
add check for begin and end date to getProjectQfRoundStats
RamRamez Jun 17, 2024
5e46008
remove refreshProjectEstimatedMatchingView from tests
RamRamez Jun 17, 2024
f43794e
fix qfRoundRepository.test.ts tests
RamRamez Jun 17, 2024
c700005
remove qfRound stats from projects when added or removed from QF round
RamRamez Jun 18, 2024
3df84dd
Merge pull request #1630 from Giveth/fix-estimated-matching-view
RamRamez Jun 18, 2024
e034f47
update added projects only
RamRamez Jun 18, 2024
f1bb60f
update added projects only
RamRamez Jun 18, 2024
847d2ef
optimize refreshProjectEstimatedMatchingView
RamRamez Jun 18, 2024
e2dc95c
set NODE_ENV for refreshProjectEstimatedMatchingView
RamRamez Jun 18, 2024
3caddea
merge getQfRoundUniqueDonors and getQfRoundTotalDonations
RamRamez Jun 18, 2024
fdfc387
fix adding valueUsd to query
RamRamez Jun 18, 2024
8e849fb
Merge pull request #1633 from Giveth/merge-getQfRoundUniqueDonors-and…
RamRamez Jun 18, 2024
34c1630
add userQfRoundModelScore
CarlosQ96 Jun 18, 2024
7f8cb73
remove minimumPassportScore from getProjectQfRoundStats
RamRamez Jun 19, 2024
727bbce
remove user join from getProjectQfRoundStats
RamRamez Jun 19, 2024
382a73e
Merge pull request #1632 from Giveth/optimize-refreshProjectEstimated…
RamRamez Jun 19, 2024
404c648
remove insertDonationsFromQfRoundHistory from syncDonationStatusWithB…
RamRamez Jun 19, 2024
8725500
enable replica
RamRamez Jun 19, 2024
179c92b
projectVerificationRepository.ts replace .save with update method
RamRamez Jun 19, 2024
da168df
projectVerificationRepository.ts replace .save with update method
RamRamez Jun 19, 2024
8d2f1a5
remove unused fields from logs
RamRamez Jun 19, 2024
0f9717f
remove user from badge warning
RamRamez Jun 19, 2024
713eca0
optimize projectsWithoutUpdateAfterTimeFrame
RamRamez Jun 19, 2024
e0a4efa
fix merge conflicts
CarlosQ96 Jun 20, 2024
0270e4e
Zkevm integration (#1635)
mohammadranjbarz Jun 20, 2024
b20d23d
fix merge conflicts
RamRamez Jun 20, 2024
86107c8
Merge pull request #1636 from Giveth/remove-insertDonationsFromQfRoun…
RamRamez Jun 20, 2024
117f6b7
add projectId to projectRepository.ts
RamRamez Jun 20, 2024
851d411
remove unnecessary updatedAt
RamRamez Jun 20, 2024
6f81446
Merge branch 'staging' into optimize-check-project-verification
RamRamez Jun 20, 2024
013294c
fix: get unique_donors based on user wallet address not added to sybi…
Meriem-BM Jun 21, 2024
076c518
Merge pull request #1637 from Giveth/optimize-check-project-verification
RamRamez Jun 22, 2024
3cd7ed2
add cache to findActiveQfRound
RamRamez Jun 22, 2024
1bb77c1
Add on conflicrt do nothing for add zkevm tokens
mohammadranjbarz Jun 23, 2024
59e1b7e
Fix add polygon zkevm token migration
mohammadranjbarz Jun 23, 2024
50179c3
remove updateTotalDonationsOfProject from migrations
RamRamez Jun 23, 2024
2e8f139
replace updateTotalDonationsOfProject with updateProjectStatistics
RamRamez Jun 23, 2024
a3309a1
replace updateTotalDonationsOfProject with updateProjectStatistics
RamRamez Jun 23, 2024
e1d5d6d
remove sumDonationValueUsd from project
RamRamez Jun 23, 2024
7a723ce
Merge pull request #1643 from Giveth/fix/findArchivedQfRounds
Meriem-BM Jun 23, 2024
804a396
do email verification on project verification form through Ortto
RamRamez Jun 24, 2024
50b943b
add solana to available networks for qfround
CarlosQ96 Jun 24, 2024
093d034
remove knownAsSybilAddress from user
RamRamez Jun 24, 2024
2108bd9
wrong query cache in some functions
RamRamez Jun 24, 2024
da8ead3
Merge pull request #1651 from Giveth/remove-knownAsSybilAddress-from-…
RamRamez Jun 24, 2024
9101257
Merge pull request #1652 from Giveth/wrong-query-cache-in-some-functions
RamRamez Jun 24, 2024
31e5d52
User Story - Rejected project owner reason
RamRamez Jun 25, 2024
a0c6e5b
use networkId instead of optimism-only flag (#1653)
ae2079 Jun 25, 2024
0ef0f1d
fatal errors (#1640)
ae2079 Jun 26, 2024
e90c05a
added on final step for verification project data
kkatusic Jun 26, 2024
ce5dd10
Replace ortto External Embedded Webform for Onboarding guide
RamRamez Jun 26, 2024
7fb5174
fix: findArchivedQfRounds query
Meriem-BM Jun 27, 2024
672c1bd
Merge pull request #1660 from Giveth/fix/findArchivedQfRounds
Meriem-BM Jun 27, 2024
6de2ef7
Merge branch 'refs/heads/staging' into add-cache-to-findActiveQfRound
RamRamez Jun 28, 2024
5cbdeab
Merge pull request #1644 from Giveth/add-cache-to-findActiveQfRound
RamRamez Jun 28, 2024
50d2563
Merge branch 'staging' into Replace-ortto-External-Embedded-Webform-f…
RamRamez Jun 30, 2024
18dc52d
fix subscribeOnboarding args
RamRamez Jun 30, 2024
5f8f952
change output to boolean
RamRamez Jun 30, 2024
a60e86e
Merge branch 'refs/heads/staging' into remove-updateTotalDonationsOfP…
RamRamez Jun 30, 2024
b731ea7
Merge pull request #1648 from Giveth/remove-updateTotalDonationsOfPro…
RamRamez Jun 30, 2024
e1542ad
Merge pull request #1649 from Giveth/do-email-verification-on-project…
RamRamez Jun 30, 2024
04ec864
WIP: add API key to request & add fetch MBD score record from DB
Meriem-BM Jun 30, 2024
69f4630
Merge branch 'master' into staging
mohammadranjbarz Jul 1, 2024
f6a55f5
Merge pull request #1654 from Giveth/User-Story---Rejected-project-ow…
RamRamez Jul 1, 2024
685ac4d
Merge branch 'refs/heads/staging' into Replace-ortto-External-Embedde…
RamRamez Jul 1, 2024
078efce
Merge pull request #1657 from Giveth/Replace-ortto-External-Embedded-…
RamRamez Jul 1, 2024
80bf7f1
fixed last step verification
kkatusic Jul 1, 2024
e3d7294
fixed typo
kkatusic Jul 1, 2024
922f701
WIP: add field to user that holds user MBD score for an active round
Meriem-BM Jul 2, 2024
641ae06
disable DB Replica on staging
RamRamez Jul 2, 2024
6935405
Merge branch 'master' into staging
mohammadranjbarz Jul 3, 2024
bb44cca
Merge branch 'staging' of github.com:Giveth/impact-graph into staging
mohammadranjbarz Jul 3, 2024
511029d
Merge branch 'master' into staging
mohammadranjbarz Jul 3, 2024
b2c6f83
Merge branch 'master' into staging
mohammadranjbarz Jul 3, 2024
2775e01
Merge branch 'master' into staging
mohammadranjbarz Jul 3, 2024
f569275
fetch data uere with the score from MBD & remove non needed query
Meriem-BM Jul 3, 2024
1c17941
Fix some test cases about stable coin donations
mohammadranjbarz Jul 3, 2024
0ce70b8
fix: issue with adminJs authentication when user has hash as null
Meriem-BM Jul 4, 2024
03eecc6
Merge branch 'staging' into feature_new_qf_scoring_model
Meriem-BM Jul 4, 2024
13001a1
Merge branch 'staging' of github.com:Giveth/impact-graph into feature…
Meriem-BM Jul 4, 2024
de8c3a0
Merge branch 'feature_new_qf_scoring_model' of github.com:Giveth/impa…
Meriem-BM Jul 4, 2024
69a00a8
"Last Update" on project card is not correct
RamRamez Jul 4, 2024
d680f4c
Fix some test cases about stable coin donations (#1665)
mohammadranjbarz Jul 7, 2024
475289e
Merge branch 'staging' of github.com:Giveth/impact-graph into staging
mohammadranjbarz Jul 7, 2024
63f28d1
Bump follow-redirects from 1.15.5 to 1.15.6 (#1414)
dependabot[bot] Jul 7, 2024
2ab5971
Bump @solana/web3.js from 1.87.6 to 1.87.7 (#1492)
dependabot[bot] Jul 7, 2024
0a27af2
Bump express from 4.18.2 to 4.19.2 (#1430)
dependabot[bot] Jul 7, 2024
0e02367
Bump braces from 3.0.2 to 3.0.3 (#1629)
dependabot[bot] Jul 7, 2024
a1e9e68
Merge branch 'staging' into add_ver_step
mohammadranjbarz Jul 7, 2024
56da750
Merge branch 'staging' of github.com:Giveth/impact-graph into staging
mohammadranjbarz Jul 7, 2024
cb53599
Merge branch 'staging' into feature_new_qf_scoring_model
mohammadranjbarz Jul 7, 2024
dc2009f
Bump undici from 5.28.3 to 5.28.4 (#1454)
dependabot[bot] Jul 7, 2024
4e47ddf
Merge pull request #1666 from Giveth/fix/adminJs_auth_issue
Meriem-BM Jul 7, 2024
596bb99
Merge branch 'staging' into add_ver_step
RamRamez Jul 7, 2024
dc7c369
Merge branch 'staging' into Last-Update-on-project-card-is-not-correc…
RamRamez Jul 7, 2024
a0daa2b
fix types
RamRamez Jul 7, 2024
20a581a
Updated project verification form resolver test
kkatusic Jul 8, 2024
323036d
fix extracting last comment
RamRamez Jul 8, 2024
9836981
get donation to giveth with donation box analytics (#1661)
ae2079 Jul 9, 2024
f4cd115
add test for fetching and refreshing qfroundscore for model
CarlosQ96 Jul 9, 2024
06e747f
Merge pull request #1658 from Giveth/add_ver_step
kkatusic Jul 9, 2024
63671a3
Merge branch 'staging' of github.com:Giveth/impact-graph into staging
mohammadranjbarz Jul 10, 2024
bbecb74
revert changes on package,json
RamRamez Jul 10, 2024
5254fac
Merge branch 'refs/heads/staging' into Last-Update-on-project-card-is…
RamRamez Jul 10, 2024
54363dc
revert changes on package,json
RamRamez Jul 10, 2024
2c2c866
fix migration error
RamRamez Jul 10, 2024
dea4ebc
fix migration error
RamRamez Jul 10, 2024
58ee0c8
Merge pull request #1667 from Giveth/Last-Update-on-project-card-is-n…
RamRamez Jul 10, 2024
dc3a424
fix: turn minimumValidUsdValue to nullable when querying
Meriem-BM Jul 10, 2024
2666a56
remove updatedAt from projects tab
RamRamez Jul 10, 2024
039617e
Remove old donation and add new ones (#1674)
ae2079 Jul 10, 2024
b3a3337
Merge branch 'staging' of github.com:Giveth/impact-graph into staging
mohammadranjbarz Jul 11, 2024
f7462a2
remove verified from projects tab edit menu
RamRamez Jul 11, 2024
8533319
remove verified from projectVerificationTab edit menu
RamRamez Jul 11, 2024
e5403d2
fix total donations query
CarlosQ96 Jul 12, 2024
2d8a829
Merge branch 'staging' of github.com:Giveth/impact-graph into feature…
Meriem-BM Jul 12, 2024
dbb7a8f
fix archived_round totals
CarlosQ96 Jul 12, 2024
62947a4
fix latestUpdate column if not exists
CarlosQ96 Jul 12, 2024
3bf23df
fix join for totals
CarlosQ96 Jul 12, 2024
83f06a9
Merge pull request #1675 from Giveth/hotfix_total_donations_query
CarlosQ96 Jul 12, 2024
cd839dc
fix total donations with subquery
CarlosQ96 Jul 13, 2024
45e5011
Merge branch 'master' into staging
CarlosQ96 Jul 13, 2024
890ca7b
Merge branch 'refs/heads/master' into staging
RamRamez Jul 14, 2024
bbd4bc6
Merge branch 'refs/heads/master' into staging
RamRamez Jul 14, 2024
4f1676c
Reslove conflict and merge from `staging` into `feature_new_qf_scorin…
Meriem-BM Jul 15, 2024
390d8b3
fix add some error handling and remove commented interface
Meriem-BM Jul 15, 2024
d50953c
fix: resolve conflict
Meriem-BM Jul 15, 2024
cde4877
fix: resolve conflict
Meriem-BM Jul 15, 2024
7cabdf5
fix USD value not showing
RamRamez Jul 15, 2024
977a932
fix: convert timestap retrieved from RPC provider to milisconds
Meriem-BM Jul 15, 2024
51afe2f
fix: donation test cases (milliseconds)
Meriem-BM Jul 15, 2024
ba12770
fix: donation test cases (milliseconds)
Meriem-BM Jul 15, 2024
6aa30a6
Endaoment integration (#1663)
mohammadranjbarz Jul 15, 2024
6b96e6c
fix: donation test cases (milliseconds)
Meriem-BM Jul 15, 2024
757bad9
Merge branch 'staging' of github.com:Giveth/impact-graph into staging
mohammadranjbarz Jul 15, 2024
53afd42
fix: donation test cases (milliseconds)
Meriem-BM Jul 15, 2024
9f66159
Merge pull request #1634 from Giveth/feature_new_qf_scoring_model
Meriem-BM Jul 15, 2024
e1ccfc4
Merge branch 'staging' into fix/3456_ethDonation_not_showing
Meriem-BM Jul 15, 2024
c2ce143
Merge pull request #1684 from Giveth/fix/3456_ethDonation_not_showing
Meriem-BM Jul 15, 2024
886ab6a
Modify ormconfig for running migrations
mohammadranjbarz Jul 15, 2024
15a957f
Merge branch 'staging' of github.com:Giveth/impact-graph into staging
mohammadranjbarz Jul 15, 2024
f53c7da
Merge branch 'master' into staging
mohammadranjbarz Jul 15, 2024
d49daae
Run ts files for migrations
mohammadranjbarz Jul 15, 2024
be5325c
Make isRecipient of project_addresses of endaoment project true
mohammadranjbarz Jul 16, 2024
96d4505
Fix type error of one of endaoment projects
mohammadranjbarz Jul 16, 2024
ef0079c
add test case for filling prices
RamRamez Jul 16, 2024
c474a49
Merge pull request #1683 from Giveth/fix-USD-value-not-showing
RamRamez Jul 17, 2024
6770bd8
Modify add endaoment organization migration to pass the tests
mohammadranjbarz Jul 17, 2024
a34c008
fix: convert minimumUserAnalysisScore to Float on qfRound entity
Meriem-BM Jul 17, 2024
4b2b8a7
fix: revert migration changes
Meriem-BM Jul 17, 2024
1f35df3
add log for filling prices
RamRamez Jul 17, 2024
f14a053
Merge pull request #1692 from Giveth/fix/minimumUserAnalysisScore
Meriem-BM Jul 17, 2024
f9b8109
feat: add github on project socialmedia enum
Reshzera Jul 17, 2024
fb57167
Merge master to staging (#1696)
ae2079 Jul 18, 2024
bb71f47
Add organization filter to projectsTab.ts in admin panel
mohammadranjbarz Jul 18, 2024
af850a4
Merge branch 'staging' of github.com:Giveth/impact-graph into staging
mohammadranjbarz Jul 18, 2024
b74a17e
Fill description summary for endaoment projects
mohammadranjbarz Jul 18, 2024
c4dbe05
Fix eslint errors
mohammadranjbarz Jul 18, 2024
67b33fc
Replace special characters of slugs of endaoment projects with -
mohammadranjbarz Jul 18, 2024
40d4b47
Fix eslint errors
mohammadranjbarz Jul 18, 2024
f63c770
return hardcoded as user MBD score
Meriem-BM Jul 18, 2024
5b84c6b
Merge pull request #1699 from Giveth/fix/minimumUserAnalysisScore
Meriem-BM Jul 18, 2024
fef23d3
Merge pull request #1694 from Giveth/feat/issue-4216
RamRamez Jul 18, 2024
ab9fe0b
rename qfRound minimumUserAnalysisScore field
Meriem-BM Jul 18, 2024
2effef3
Merge pull request #1701 from Giveth/fix/minimumUserAnalysisScore
Meriem-BM Jul 18, 2024
5c45e23
Resolve conflicts (#1703)
ae2079 Jul 19, 2024
ce073bc
Modify endaoment categories and relate them to projects
mohammadranjbarz Jul 19, 2024
2210303
Merge branch 'staging' of github.com:Giveth/impact-graph into staging
mohammadranjbarz Jul 19, 2024
bf527a2
Add canUseOnFrontend to category so can show a category but don't all…
mohammadranjbarz Jul 19, 2024
2877a5b
Fix project resolver test case
mohammadranjbarz Jul 19, 2024
e22bb43
feat: add tacking recurring donations queries
Meriem-BM Jul 19, 2024
6dec94f
fix: delete unwanted recurring donation test cases
Meriem-BM Jul 19, 2024
553db78
fix CPU spikes
RamRamez Jul 19, 2024
15e364d
add new test case for project update
RamRamez Jul 20, 2024
e41fb43
fix test case
RamRamez Jul 20, 2024
8a3957d
Merge pull request #1705 from Giveth/fix-CPU-spikes
RamRamez Jul 20, 2024
695d7cd
Fix add endaoment integration
mohammadranjbarz Jul 20, 2024
2e0175c
Merge branch 'staging' of github.com:Giveth/impact-graph into staging
mohammadranjbarz Jul 20, 2024
2f8c7e5
Filter isActive and canUseOnFrontend categories in projectResolver
mohammadranjbarz Jul 20, 2024
345acfe
Filter isActive and canUseOnFrontend categories in projectResolver
mohammadranjbarz Jul 20, 2024
93e80b0
Return canUseOnFrontend in main category list
mohammadranjbarz Jul 20, 2024
1f36055
optimize projectUpdates query
RamRamez Jul 20, 2024
c7223db
Comment migrations related to endaoment (#1706)
mohammadranjbarz Jul 21, 2024
b3267b6
1.24.0
mohammadranjbarz Jul 21, 2024
d62dc68
Test ci/cd
mohammadranjbarz Jul 21, 2024
1e15b69
Resolve merge conflicts
mohammadranjbarz Jul 21, 2024
6182ec0
Fix build problem
mohammadranjbarz Jul 21, 2024
0171095
Merge branch 'refs/heads/staging' into optimize-projectUpdates-query
RamRamez Jul 21, 2024
f7d8c9c
optimize projectUpdates endpoint
RamRamez Jul 21, 2024
e380bf8
optimize projectUpdates endpoint - add cache
RamRamez Jul 21, 2024
03ef6c2
add dynamic field selection
RamRamez Jul 21, 2024
eed3698
add a default value for etc mordor url (#1709)
ae2079 Jul 22, 2024
9b0e57a
Remove redundant backslash
ae2079 Jul 22, 2024
3675378
fix test cases
RamRamez Jul 22, 2024
6e05995
Merge branch 'refs/heads/staging' into optimize-projectUpdates-query
RamRamez Jul 22, 2024
b12b70c
Merge pull request #1707 from Giveth/optimize-projectUpdates-query
RamRamez Jul 22, 2024
b659c58
feat: add per token data for recurring donations statistcs (pie chart…
Meriem-BM Jul 22, 2024
c217c1c
Merge pull request #1704 from Giveth/fix/track_recurring_donations
Meriem-BM Jul 23, 2024
18f3239
Change commands to run migrations as js (#1714)
ae2079 Jul 23, 2024
4b570a7
Fix build command (#1715)
ae2079 Jul 23, 2024
1fb9fa2
Check config directory existing and then copy content to it
ae2079 Jul 23, 2024
79ccb2a
Revert migration changes (#1717)
ae2079 Jul 23, 2024
4e47095
Merge branch 'refs/heads/master' into staging
RamRamez Jul 23, 2024
0c464f2
Optimise relevant donation flow (#1698)
ae2079 Jul 23, 2024
13299b8
fix: minimumPassportScore issue when tapping float number on adminJS
Meriem-BM Jul 24, 2024
e65768f
Merge pull request #1720 from Giveth/fix/minimumPassportScore
Meriem-BM Jul 24, 2024
9c56ef7
Add index to useDonationBox field (#1723)
ae2079 Jul 24, 2024
015e383
Run migrations as js files (#1718)
ae2079 Jul 24, 2024
5bbe523
Revert "Run migrations as js files (#1718)" (#1724)
ae2079 Jul 24, 2024
d9fbb5d
Which tokens are used the most on each chain by unique donors
RamRamez Jul 25, 2024
9155c7d
change getDonationStats to typeorm
RamRamez Jul 28, 2024
68a7eb1
Merge pull request #1728 from Giveth/Which-tokens-are-used-the-most-o…
RamRamez Jul 29, 2024
4a778be
update Bull
RamRamez Jul 29, 2024
1ddfb27
Merge pull request #1731 from Giveth/update-Bull
RamRamez Jul 29, 2024
27eed6f
Use raw select query instead of find function from typeorm (#1729)
ae2079 Jul 29, 2024
0bbfed0
gitcoin API update
RamRamez Jul 29, 2024
802f614
gitcoin API update
RamRamez Jul 29, 2024
c342bed
Merge pull request #1734 from Giveth/gitcoin-API-update
RamRamez Jul 29, 2024
b6ce9e1
gitcoin API update
RamRamez Jul 29, 2024
43ee401
Merge branch 'refs/heads/master' into staging
RamRamez Jul 30, 2024
cd62fb2
Add all network labels in admin panel, project tab
mohammadranjbarz Jul 30, 2024
7f6fd89
Fix eslint errors
mohammadranjbarz Jul 30, 2024
2713e07
added graphql query to fetch recurring donations by date adn project id
lovelgeorge99 Jul 30, 2024
0a0ea65
Merge branch 'staging' of https://github.com/Giveth/impact-graph into…
lovelgeorge99 Jul 30, 2024
07cfa35
fixed lint
lovelgeorge99 Jul 30, 2024
9057b77
Add all network labels in admin panel, project tab
mohammadranjbarz Jul 31, 2024
ecf19d4
allow to download email addresses
RamRamez Jul 31, 2024
2e76144
Merge pull request #1739 from Giveth/allow-to-download-email-addresses
RamRamez Jul 31, 2024
8ba5cda
Merge branch 'staging' of https://github.com/Giveth/impact-graph into…
lovelgeorge99 Aug 1, 2024
4a76b72
fix: returning QF tag to the user bookmarked projects
kkatusic Aug 1, 2024
be29a06
removed unnecessary ql fields
kkatusic Aug 2, 2024
962d94e
Merge branch 'develop' of https://github.com/Giveth/impact-graph into…
lovelgeorge99 Aug 5, 2024
ef2d009
added test cases for recurring donations by date resolver
lovelgeorge99 Aug 5, 2024
50bfd89
Merge pull request #1738 from Giveth/query-for-recurring-donation-by-…
lovelgeorge99 Aug 6, 2024
f6eb385
Make sure all Endaoment projects have been added to our DB (#1751)
mohammadranjbarz Aug 7, 2024
29ca609
Add on conflict do nothing for create endaoment organization migration
mohammadranjbarz Aug 8, 2024
2bac2c4
Merge branch 'staging' of github.com:Giveth/impact-graph into staging
mohammadranjbarz Aug 8, 2024
510ef4e
Make organizationId serial if it's not already
mohammadranjbarz Aug 8, 2024
bd32949
Fix eslint errors
mohammadranjbarz Aug 8, 2024
0d32b06
Fix add endaoment organization migration
mohammadranjbarz Aug 8, 2024
e8b6365
Fix eslint errors
mohammadranjbarz Aug 8, 2024
4d99fc4
Merge pull request #1758 from Giveth/master
RamRamez Aug 9, 2024
11154ef
Comment run migrations on production ci
mohammadranjbarz Aug 11, 2024
0b9a293
Merge pull request #1745 from Giveth/fix_qf_card_badge
kkatusic Aug 11, 2024
de6c813
Fix categories of endaoment projects
mohammadranjbarz Aug 11, 2024
7dbcf2e
Merge branch 'staging' of github.com:Giveth/impact-graph into staging
mohammadranjbarz Aug 11, 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
5 changes: 3 additions & 2 deletions .github/workflows/master-pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,9 @@ jobs:
- name: Run build
run: npm run build

- name: Run migrations
run: npm run db:migrate:run:test
# It keeps failing, comment it to test it's our code problem or the production dump on AWS
# - name: Run migrations
# run: npm run db:migrate:run:test

- name: Run tests
run: npm run test
Expand Down
1 change: 0 additions & 1 deletion config/example.env
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ ORTTO_PERSON_API=https://api.ap3api.com/v1/person/merge


RECURRING_DONATION_VERIFICATION_EXPIRATION_HOURS=24
VERIFY_RECURRING_DONATION_CRONJOB_EXPRESSION=0 * * * * *
NUMBER_OF_VERIFY_RECURRING_DONATION_CONCURRENT_JOB=1
ENABLE_DRAFT_RECURRING_DONATION=true
DRAFT_RECURRING_DONATION_MATCH_EXPIRATION_HOURS=24
Expand Down
64 changes: 64 additions & 0 deletions migration/1719740230650-add_endaoment_organization.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { ORGANIZATION_LABELS } from '../src/entities/organization';
import { NETWORK_IDS } from '../src/provider';

export class AddEndaomentOrganization1719740230650
implements MigrationInterface
{
public async up(queryRunner: QueryRunner): Promise<void> {
// Ensure the 'id' column is serial if it's not already
await queryRunner.query(`
DO $$
BEGIN
IF EXISTS (
SELECT 1
FROM information_schema.columns
WHERE table_name = 'organization'
AND column_name = 'id'
AND column_default IS NOT NULL
AND column_default LIKE 'nextval%'
) THEN
-- Column is already serial, do nothing
RAISE NOTICE 'Column id is already serial';
ELSE
-- Column is not serial, make it serial
ALTER TABLE "organization" ALTER COLUMN "id" TYPE BIGINT;
ALTER TABLE "organization" ALTER COLUMN "id" SET NOT NULL;
ALTER TABLE "organization" ALTER COLUMN "id" ADD GENERATED BY DEFAULT AS IDENTITY;
END IF;
END $$;
`);

// Insert the organization if it doesn't exist already
await queryRunner.query(`
INSERT INTO "organization" ("name", "disableNotifications", "disableRecurringDonations", "disableUpdateEnforcement", "label", "website", "supportCustomTokens")
SELECT 'Endaoment', true, true, true, '${ORGANIZATION_LABELS.ENDAOMENT}', 'https://endaoment.org', false
WHERE NOT EXISTS (SELECT 1 FROM "organization" WHERE "label" = '${ORGANIZATION_LABELS.ENDAOMENT}');
`);

const endaomentOrganization = (
await queryRunner.query(
`SELECT * FROM "organization" WHERE "label" = '${ORGANIZATION_LABELS.ENDAOMENT}'`,
)
)[0];

const tokens = await queryRunner.query(`
SELECT * FROM "token"
WHERE "networkId" = ${NETWORK_IDS.BASE_MAINNET} OR "networkId" = ${NETWORK_IDS.MAIN_NET} OR "networkId" = ${NETWORK_IDS.OPTIMISTIC};
`);

for (const token of tokens) {
await queryRunner.query(`
INSERT INTO "organization_tokens_token" ("tokenId", "organizationId")
VALUES (${token.id}, ${endaomentOrganization.id})
ON CONFLICT DO NOTHING;
`);
}
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`
DELETE FROM "organization" WHERE "label" = '${ORGANIZATION_LABELS.ENDAOMENT}';
`);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,19 @@ export class CreateEndaomentsCategories1719808494903
await queryRunner.query(`
INSERT INTO "category" ("name", "value", "source", "mainCategoryId", "isActive")
VALUES
('Endaoment', 'endaoment', '', ${ngoMainCategory[0].id}, true),
('Religious', 'religious', '', ${artCultureMainCategory[0].id}, true),
('Disaster Relief', 'disaster-relief', '', ${ngoMainCategory[0].id}, true),
('Recreation', 'recreation', '', ${healthWellnessMainCategory[0].id}, true),
('Financial Services', 'financial-services', '', ${financeMainCategory[0].id}, true),
('International Aid', 'international-aid', '', ${ngoMainCategory[0].id}, true);
('endaoment', 'Endaoment', '', ${ngoMainCategory[0].id}, true),
('religious', 'Religious', '', ${artCultureMainCategory[0].id}, true),
('disaster-relief', 'Disaster Relief', '', ${ngoMainCategory[0].id}, true),
('recreation', 'Recreation', '', ${healthWellnessMainCategory[0].id}, true),
('financial-services', 'Financial Services', '', ${financeMainCategory[0].id}, true),
('international-aid', 'International Aid', '', ${ngoMainCategory[0].id}, true);
`);
}

public async down(queryRunner: QueryRunner): Promise<void> {
// Delete Sub-Categories
await queryRunner.query(
`DELETE FROM "category" WHERE "value" IN ('endaoment', 'religious', 'disaster-relief', 'recreation', 'financial-services', 'international-aid')`,
`DELETE FROM "category" WHERE "name" IN ('endaoment', 'religious', 'disaster-relief', 'recreation', 'financial-services', 'international-aid')`,
);
}
}
Original file line number Diff line number Diff line change
@@ -1,11 +1,55 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
import { endaomentProjectCategoryMapping } from '../data/endaomentProjectCategoryMapping';
import { endaomentProjects } from '../data/importedEndaomentProjects';
import { NETWORK_IDS } from '../../src/provider';
import { ReviewStatus } from '../../src/entities/project';
import { endaomentProjectCategoryMapping } from './data/endaomentProjectCategoryMapping';
import { endaomentProjects } from './data/importedEndaomentProjects';
import { NETWORK_IDS } from '../src/provider';
import { ReviewStatus } from '../src/entities/project';
import {
creteSlugFromProject,
titleWithoutSpecialCharacters,
} from '../src/utils/utils';

export class AddEndaomentsProjects1719808494904 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
const imageCategoryMapping = {
'Public Goods': 'community',
'Peace & Justice': 'community',
'Sustainable Cities & Communities': 'nature',
Housing: 'community',
'Social Services': 'community',
'Family & Children': 'community',
'Health Care': 'community',
'Registered Non-profits': 'non-profit',
Research: 'education',
'Mental Health': 'health-wellness',
Animals: 'nature',
Nutrition: 'health-wellness',
Religious: 'community',
Art: 'art-culture',
Food: 'community',
'Disaster Relief': 'non-profit',
'Conservation & Biodiversity': 'nature',
Education: 'education',
'Industry & Innovation': 'economics-infrastructure',
'Financial Services': 'finance',
Schooling: 'education',
Inclusion: 'equality',
Climate: 'nature',
'Water & Sanitation': 'community',
Tech: 'technology',
Employment: 'finance',
Infrastructure: 'economics-infrastructure',
'International Aid': 'non-profit',
Other: '1',
Recreation: 'community',
culture: 'art-culture',
Recycling: 'nature',
Agriculture: 'nature',
Grassroots: 'community',
'BIPOC Communities': 'equality',
Fundraising: 'non-profit',
'Registred Non-profits': 'non-profit',
'Gender Equality': 'equality',
};
// Insert the Endaoment organization if it doesn't exist
await queryRunner.query(`
INSERT INTO "organization" ("name", "disableNotifications", "disableRecurringDonations", "disableUpdateEnforcement", "label", "website", "supportCustomTokens")
Expand Down Expand Up @@ -44,26 +88,43 @@ export class AddEndaomentsProjects1719808494904 implements MigrationInterface {
// Insert projects and their addresses
for (const project of endaomentProjects) {
// Prepare slug and quality score
const slugBase = project.name.replace(/[*+~.,()'"!:@]/g, '');
const slug = slugBase
.toLowerCase()
.replace(/ /g, '-')
.replace('/', '-')
.replace('\\', '-');
const title = titleWithoutSpecialCharacters(project.name);
const slugBase = creteSlugFromProject(title);
// const slug = await getAppropriateSlug(slugBase)
const slug = slugBase;

// Insert the project-category relationship in a single query
const getCategoryNames = (nteeCode: string): string[] => {
const mapping = endaomentProjectCategoryMapping.find(
category => category.nteeCode === nteeCode,
);
return mapping
? [
mapping.category1,
mapping.category2,
mapping.category3 || '',
mapping.category4 || '',
].filter(Boolean)
: [];
};
const categoryNames = getCategoryNames(String(project.nteeCode));

const bannerImage = `/images/defaultProjectImages/${imageCategoryMapping[categoryNames[1]] || '1'}.png`;

// Insert the project
await queryRunner.query(`
INSERT INTO "project" (
"title", "description", "organizationId", "walletAddress", "creationDate", "slug", "image", "slugHistory", "statusId", "totalDonations", "totalReactions", "totalProjectUpdates", "listed", "reviewStatus", "verified", "giveBacks", "isImported", "adminUserId"
"title", "description", "descriptionSummary", "organizationId", "walletAddress", "creationDate", "slug", "image", "slugHistory", "statusId", "totalDonations", "totalReactions", "totalProjectUpdates", "listed", "reviewStatus", "verified", "giveBacks", "isImported", "adminUserId"
)
VALUES (
'${project.name.replace(/'/g, '')}',
'${title}',
'${project.description.replace(/'/g, '')}',
'${project.description.replace(/'/g, '')}',
${endaomentOrgId},
'${project.mainnetAddress || ''}',
NOW(),
'${slug}',
'/images/defaultProjectImages/1.png', -- Default image
'${bannerImage}',
'{}', -- Empty slug history
5, -- statusId 5 is 'Active'
0,
Expand All @@ -76,39 +137,23 @@ export class AddEndaomentsProjects1719808494904 implements MigrationInterface {
true,
${adminUser?.id}
)
ON CONFLICT ("slug") DO NOTHING; -- Handle conflict on unique constraint

`);
// ON CONFLICT ("slug") DO NOTHING; -- Handle conflict on unique constraint

// Get the inserted project's ID
const projectIdResult = await queryRunner.query(`
SELECT "id" FROM "project" WHERE "title" = '${project.name.replace(/'/g, '')}' AND "organizationId" = ${endaomentOrgId};
SELECT "id" FROM "project" WHERE "slug" = '${slug}' AND "organizationId" = ${endaomentOrgId};
`);
const projectId = projectIdResult[0]?.id;
if (!projectId) {
// It means we have project with same slug so the creation has failed
continue;
}

// Insert the project-category relationship in a single query
const getCategoryNames = (nteeCode: string): string[] => {
const mapping = endaomentProjectCategoryMapping.find(
category => category.nteeCode === nteeCode,
);
return mapping
? [
mapping.category1,
mapping.category2,
mapping.category3,
mapping.category4,
].filter(Boolean)
: [];
};
const categoryNames = getCategoryNames(String(project.nteeCode));

for (const categoryName of categoryNames) {
const categoryIdResult = await queryRunner.query(`
SELECT "id" FROM "category" WHERE "name" = '${categoryName.replace(/'/g, "''")}' LIMIT 1;
SELECT "id" FROM "category" WHERE "value" = '${categoryName.replace(/'/g, "''")}' LIMIT 1;
`);
const categoryId = categoryIdResult[0]?.id;

Expand Down Expand Up @@ -153,7 +198,7 @@ export class AddEndaomentsProjects1719808494904 implements MigrationInterface {
await queryRunner.query(`
INSERT INTO "project_update" ("userId", "projectId", "content", "title", "createdAt", "isMain")
VALUES (
(SELECT "id" FROM "user" WHERE "email" = '${adminUser?.email || ''}' LIMIT 1),
${adminUser?.id},
${projectId},
'',
'',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,15 +119,17 @@ export class FillUseDonationBoxAndRelevantTxHashInDonation1720634181001
)
.join(', ');

await queryRunner.query(
`
if (updateQuery.length > 0) {
await queryRunner.query(
`
UPDATE donation AS d
SET "useDonationBox" = u."useDonationBox",
"relevantDonationTxHash" = u."relevantDonationTxHash"
FROM (VALUES ${updateQuery}) AS u(id, "useDonationBox", "relevantDonationTxHash")
WHERE d.id = u.id;
`,
);
);
}
}

public async down(queryRunner: QueryRunner): Promise<void> {
Expand Down
Loading
Loading