From a712c89f6a1e818e419c4151a78981f56bbc832f Mon Sep 17 00:00:00 2001 From: Andrzej Polit Date: Thu, 28 May 2020 11:16:03 +0200 Subject: [PATCH] Added co-author to changeset --- .../src/repos/changesets/ChangesetAuthor.tsx | 12 ++++++++++++ scm-ui/ui-types/src/Changesets.ts | 7 +++++++ 2 files changed, 19 insertions(+) diff --git a/scm-ui/ui-components/src/repos/changesets/ChangesetAuthor.tsx b/scm-ui/ui-components/src/repos/changesets/ChangesetAuthor.tsx index c70ce4ca56..418bbd6bdf 100644 --- a/scm-ui/ui-components/src/repos/changesets/ChangesetAuthor.tsx +++ b/scm-ui/ui-components/src/repos/changesets/ChangesetAuthor.tsx @@ -53,11 +53,23 @@ class ChangesetAuthor extends React.Component { ); } + 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}