76 Commits

Author SHA1 Message Date
Râu Cao
dabd997004
Update dependencies (incl. new contracts)
Needs some code updates for grant v5
2023-08-14 17:21:10 +02:00
Râu Cao
f74ccdc7ff
Remove obsolete code 2023-01-19 14:59:01 +08:00
f05436e9b9
Fix mediawiki integration
Accidentally deleted a line in a recent PR, and it slipped through the
review.
2020-10-29 15:12:50 +01:00
e305643f69
Merge pull request #61 from 67P/chore/replace_deprecated_contract_calls
Replace deprecated contract API calls
2020-10-29 14:13:36 +01:00
fc0c113997
Only create small automatic contributions for wiki edits
We decided that it's too difficult for a machine to gauge the meaning
and value of wiki edits by line numbers, so automatic kredits are now
always a small contributions. Until we have new tools for larger wiki
contributions (e.g. mediawiki tags), we can create manual contributions
for those.
2020-10-29 12:56:49 +01:00
5c6540580b
Replace deprecated contract API calls
Use the new method.
2020-10-29 12:07:42 +01:00
b7ff55929c Use new ethers.js NonceManager to handle transaction nonces
So far we have failed to globally handle the transaction nonces.
The new ethers.js v5 comes with a NonceManager that helps us handling
transaction nonces and automatically increases the nonce for each
transaction.
2020-06-27 18:24:44 +02:00
fb1a471303 Make kredits amount for zoom calls configurable
defaults to 500 - a general small contribution
2020-05-14 10:33:13 +02:00
d82e2e9256 Revert "Update integrations/zoom.js"
This reverts commit 634dc207e686764e55c7dc520a9c4e0ccf60c122.
2020-05-14 10:00:00 +02:00
634dc207e6
Update integrations/zoom.js
Co-authored-by: Sebastian Kippe <sebastian@kip.pe>
2020-05-14 09:45:42 +02:00
6fd3989118 Add zoom meeting whitelist
This allows to only record meetings for certain whitelisted meeting ids
2020-04-30 16:19:49 +02:00
e10dd4abc3 Ignore meetings that have less than 3 unique participants
zoom's participants_count is not unique and the same person can be counted
multiple times.
We need to check for unique names.
2020-04-16 18:07:17 +02:00
960dcb55de
Moar await 2020-04-16 17:33:53 +02:00
60ed697460 Add comment when tx is undefined
We createContributionFor() simply returns if no contributor is found.
2020-04-16 17:17:40 +02:00
7f653f23ce typo 2020-04-16 17:08:26 +02:00
98ff61ab0a Add handling of missing zoom profiles 2020-04-16 17:03:03 +02:00
e7f8723f6e Make sure zoom participants are unique
to make sure we only create one contribution per participants
2020-04-16 16:36:32 +02:00
8f961bb102
Apply suggestions from code review
Co-Authored-By: Sebastian Kippe <sebastian@kip.pe>
2020-04-16 12:08:50 +02:00
c4ef8de018
Nicer log messages
Co-Authored-By: Sebastian Kippe <sebastian@kip.pe>
2020-04-16 12:08:06 +02:00
110c4384e0 Autoload zoom integration 2020-04-15 21:51:02 +02:00
70ea031b31 Zoom integration using the JWT API 2020-04-15 21:29:21 +02:00
5cc0116163 Skeleton of the zoom integration
using the new zoom API
2020-02-27 15:48:55 +01:00
50002194c5
Fix warnings from express session 2019-09-01 17:04:19 +02:00
6972d6c88e
Fix critical bug in signup code
Variable scope/assignment issue
2019-09-01 17:00:56 +02:00
afa67e5ac7 Prefix all configuration environment variables
The convention here is to prefix all Kredit related configuration
variables with `KREDITS_`
2019-08-31 12:51:44 +02:00
c16ea51769 Error handling for fetching Github access token 2019-08-27 18:35:40 +02:00
32dc6a7358
GitHub signup fixes
* Don't fail when profile has no name set
* Use scope that can only read public profile information (no scope)
* Better error handling
2019-08-27 18:22:36 +02:00
53dee63a76 Add env variable for session secret 2019-08-27 15:30:30 +02:00
342a5cd829 Add gasLimit option when adding contributor 2019-08-27 13:16:43 +02:00
45064df737
Fix wrong logger function call 2019-08-27 12:57:36 +02:00
d65e92e1fe
Merge branch 'master' into feature/github-signup 2019-08-27 12:39:15 +02:00
9a4dc43aa5
Change threshold for small wiki contributions
Turns out 280 is a bit low. Let's try 500 instead.
2019-08-14 12:46:19 +02:00
082bf4848d Minor changes 2019-07-26 20:50:36 +02:00
41dd813eaf Replace custom CORS header solution with middleware 2019-07-26 20:48:20 +02:00
b35cbcc63a Finish implementation of GitHub signup oracle 2019-07-26 04:15:11 +02:00
137e9eb4ed Add initial implementation of the GitHub signup oracle 2019-07-11 15:44:58 +02:00
98ccae96f0
[gitea] Use labels for contribution kind 2019-05-08 16:16:40 +02:00
e6730802f6
Use proper syntax for sending HTTP status
Fixes deprecation warnings for the old syntax.
2019-05-08 16:14:41 +02:00
d2976b312e
Create utility modules for label processing 2019-05-08 16:14:41 +02:00
d2feee8b14
[github] Use labels for contribution kind 2019-05-08 16:14:24 +02:00
c390fc9ce7
Fix Gitea issue ID/URL being wrong
Internal issue IDs are different from the public ones in Gitea. The one
used in URLs etc. is called "number" instead of "id" in hook payloads.

fixes #33
2019-04-28 13:01:09 +01:00
5a9edda1cd
Add Gitea integration
Support for Gitea organization hooks, based on GitHub hooks code.

closes #24
2019-04-24 13:27:18 +01:00
1255d7ce19
Fix another wrong const 2019-04-17 11:13:49 +01:00
a0f982432e
Fix syntax error (variable re-assignment) 2019-04-17 09:38:00 +01:00
fca991c685
Add date to mediawiki edits
Use the day before, as we collect them at 7am every day.
2019-04-13 14:18:47 +01:00
626712356a
Add date and time for GitHub issues and PRs 2019-04-13 14:04:41 +01:00
0fdd7d0f1c
Fix accidental commenting of cron schedule 2019-04-08 15:00:24 +02:00
1e0d637c26
"Fix" nonce issue for Mediawiki as well
See previous commit (dcbce66) for details.
2019-04-06 11:55:02 +02:00
dcbce66796
Hacky fix for nonce issues
This waits until a tx has likely been confirmed, before trying to send
the next one, because nonce management is broken in the ethers.js
wallet and it tries to replace a previous tx if two are sent quickly in
succession.

This will most likely break, when there are multiple independent
contrbution issuance calls (e.g. two PRs merged quickly in succession).
But at least it fixes issues/PRs with multiple assignees for most cases.
2019-04-06 11:41:19 +02:00
16b62a2545
Print actual tx error instead of guessing 2019-04-05 20:07:30 +02:00