-
Notifications
You must be signed in to change notification settings - Fork 36
New DBLP invitation — migrate authors to author{} object schema
#2846
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
Changes from 4 commits
fc0e9e3
289389e
75ffe04
39b3e3d
5765e93
6a4de87
61a1b80
4d3ac9f
104d31b
e4527b8
dd74449
9b0c392
0fa0adb
42d58d4
659e120
28e2ef6
7d1b9e4
9c61f15
de71c05
2a0f39b
45a3bbf
647deb5
d394b0c
4c2fd40
a0b0535
a381371
678cc5f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -17,14 +17,14 @@ async function process(client, edit, invitation) { | |||||
|
|
||||||
| const { profiles } = await client.getProfiles({ id: edit.signatures[0] }); | ||||||
| const userProfile = profiles[0]; | ||||||
|
|
||||||
| const usernames = userProfile.content.names.map(name => name.username); | ||||||
| const names = userProfile.content.names.map(name => name.fullname); | ||||||
|
|
||||||
| if (authorId === '') { | ||||||
| const authorName = publication.content.authorids?.value[authorIndex]; | ||||||
| if (!usernames.some(username => username === authorName)) { | ||||||
| return Promise.reject(new OpenReviewError({ name: 'Error', message: `The author name ${authorName} from index ${authorIndex} doesn't match with the names listed in your profile` })); | ||||||
| const authorUsername = publication.content.authors.value[authorIndex]?.username; | ||||||
| if (!usernames.some(username => username === authorUsername)) { | ||||||
| return Promise.reject(new OpenReviewError({ name: 'Error', message: `The author name ${authorUsername} from index ${authorIndex} doesn't match with the names listed in your profile` })); | ||||||
|
||||||
| return Promise.reject(new OpenReviewError({ name: 'Error', message: `The author name ${authorUsername} from index ${authorIndex} doesn't match with the names listed in your profile` })); | |
| return Promise.reject(new OpenReviewError({ name: 'Error', message: `The author username ${authorUsername} from index ${authorIndex} doesn't match with the usernames listed in your profile` })); |
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -16,12 +16,12 @@ async function process(client, edit, invitation) { | |||||||||||
|
|
||||||||||||
| const { profiles } = await client.getProfiles({ id: edit.signatures[0] }); | ||||||||||||
| const userProfile = profiles[0]; | ||||||||||||
|
|
||||||||||||
| const usernames = userProfile.content.names.map(name => name.username); | ||||||||||||
|
||||||||||||
| const usernames = userProfile.content.names.map(name => name.username); | |
| const names = Array.isArray(userProfile?.content?.names) ? userProfile.content.names : []; | |
| const usernames = names | |
| .map(name => name && name.username) | |
| .filter(username => !!username); |
Uh oh!
There was an error while loading. Please reload this page.