Compare commits

...

6 Commits

Author SHA1 Message Date
99f64fe3db 5.5.0 2019-09-20 10:55:22 +02:00
a318fe8374 Add release-drafter config 2019-09-18 12:49:00 +02:00
eded4a811f Merge pull request #175 from 67P/feature/zoom-profile
Add support for zoom profiles
2019-09-18 09:28:19 +02:00
66a37a1e74 Improve property name 2019-09-18 08:44:13 +02:00
aba4a23104 Fixes & linting 2019-09-17 18:30:19 +02:00
13ed02e134 Add support for zoom profils
This adds an accessor for the zoom_name to the contributor profile.
Doing this also removes general support for preserviing the contributor
accounts array as this was buggy and caused accounts to be added
multiple times.
2019-09-17 17:24:35 +02:00
4 changed files with 22 additions and 6 deletions

4
.github/release-drafter.yml vendored Normal file
View File

@@ -0,0 +1,4 @@
template: |
## Changes
$CHANGES

View File

@@ -28,7 +28,7 @@ class Contributor {
github_username, github_username,
gitea_username, gitea_username,
wiki_username, wiki_username,
accounts, zoom_display_name,
} = this; } = this;
let data = { let data = {
@@ -36,7 +36,7 @@ class Contributor {
'@type': 'Contributor', '@type': 'Contributor',
kind, kind,
name, name,
accounts: accounts || [], accounts: [],
}; };
if (url) { if (url) {
@@ -68,6 +68,13 @@ class Contributor {
}); });
} }
if (zoom_display_name) {
data.accounts.push({
'site': 'zoom.us',
'username': zoom_display_name,
});
}
// Write it pretty to ipfs // Write it pretty to ipfs
return JSON.stringify(data, null, 2); return JSON.stringify(data, null, 2);
} }
@@ -97,10 +104,11 @@ class Contributor {
accounts, accounts,
} = JSON.parse(serialized.toString('utf8')); } = JSON.parse(serialized.toString('utf8'));
let github_username, github_uid, gitea_username, wiki_username; let github_username, github_uid, gitea_username, wiki_username, zoom_display_name;
let github = accounts.find(a => a.site === 'github.com'); let github = accounts.find(a => a.site === 'github.com');
let gitea = accounts.find(a => a.site === 'gitea.kosmos.org'); let gitea = accounts.find(a => a.site === 'gitea.kosmos.org');
let wiki = accounts.find(a => a.site === 'wiki.kosmos.org'); let wiki = accounts.find(a => a.site === 'wiki.kosmos.org');
let zoom = accounts.find(a => a.site === 'zoom.us');
if (github) { if (github) {
(({ username: github_username, uid: github_uid} = github)); (({ username: github_username, uid: github_uid} = github));
@@ -111,6 +119,9 @@ class Contributor {
if (wiki) { if (wiki) {
(({ username: wiki_username } = wiki)); (({ username: wiki_username } = wiki));
} }
if (zoom) {
(({ username: zoom_display_name } = zoom));
}
return { return {
name, name,
@@ -121,6 +132,7 @@ class Contributor {
github_username, github_username,
gitea_username, gitea_username,
wiki_username, wiki_username,
zoom_display_name,
ipfsData: serialized, ipfsData: serialized,
}; };
} }

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{ {
"name": "kredits-contracts", "name": "kredits-contracts",
"version": "5.4.0", "version": "5.5.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,
"dependencies": { "dependencies": {

View File

@@ -1,6 +1,6 @@
{ {
"name": "kredits-contracts", "name": "kredits-contracts",
"version": "5.4.0", "version": "5.5.0",
"description": "Ethereum contracts and npm wrapper for Kredits", "description": "Ethereum contracts and npm wrapper for Kredits",
"main": "./lib/kredits.js", "main": "./lib/kredits.js",
"directories": { "directories": {