Added co-author to changeset

This commit is contained in:
Andrzej Polit
2020-05-28 11:16:03 +02:00
committed by René Pfeuffer
parent e451bb618e
commit a712c89f6a
2 changed files with 19 additions and 0 deletions

View File

@@ -53,11 +53,23 @@ class ChangesetAuthor extends React.Component<Props> {
);
}
checkIfCoAuthorsExists() {
console.log(this.props.changeset.trailerPersons.filter(p => p.trailerType === "Co-authored-by").length > 0);
return this.props.changeset.trailerPersons.filter(p => p.trailerType === "Co-authored-by").length > 0;
}
renderCoAuthors() {
const { t } = this.props;
return <>{t("changeset.author.prefix")}</>;
}
withExtensionPoint(child: any) {
const { t } = this.props;
return (
<>
{t("changeset.author.prefix")} {child}
{this.checkIfCoAuthorsExists() ? this.renderCoAuthors() : null}
<ExtensionPoint
name="changesets.author.suffix"
props={{