-
Notifications
You must be signed in to change notification settings - Fork 1
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
Pivotal ID # 187133668: DOI Last Name #832
Pivotal ID # 187133668: DOI Last Name #832
Conversation
Register the DOI without contributors when the authors name is not complete
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM please consider minor comments
private fun getContributors(submission: Submission): List<Contributor> { | ||
fun isNameValid(author: Section): Boolean { | ||
val name = author.findAttr(NAME_ATTR) | ||
return name.isNotBlank() && name!!.contains(" ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
white spaes are part of blank definition so I think that is not neded.
public actual fun CharSequence.isBlank(): Boolean = length == 0 || indices.all { this[it].isWhitespace() }
val contributors = | ||
submission | ||
.allSections() | ||
.filter { it.type.lowercase() == AUTHOR_TYPE.lowercase() } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what about it.type.equals(AUTHOR_TYPE, ignoreCase = true)
Code review comments
Fix CLI deployment
Register the DOI without contributors when the authors name is not complete