}
renderSecurityReports() {
- if (this.props.component.qualifier === 'BRC' || this.props.component.qualifier === 'DIR') {
+ const { branchLike, component } = this.props;
+
+ if (component.qualifier === 'BRC' || component.qualifier === 'DIR') {
+ return null;
+ }
+
+ if (isShortLivingBranch(branchLike) || isPullRequest(branchLike)) {
return null;
}
+
const isActive = location.pathname.startsWith('/project/security_reports');
return (
<Dropdown overlay={this.renderSecurityReportsLink()} tagName="li">
issues.page
</Link>
</li>
- <Dropdown
- overlay={
- <ul
- className="menu"
- >
- <li>
- <Link
- activeClassName="active"
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/security_reports/owasp_top_10",
- "query": Object {
- "branch": "feature",
- "id": "foo",
- },
- }
- }
- >
- security_reports.owaspTop10.page
- </Link>
- </li>
- <li>
- <Link
- activeClassName="active"
- onlyActiveOnIndex={false}
- style={Object {}}
- to={
- Object {
- "pathname": "/project/security_reports/sans_top_25",
- "query": Object {
- "branch": "feature",
- "id": "foo",
- },
- }
- }
- >
- security_reports.sansTop25.page
- </Link>
- </li>
- </ul>
- }
- tagName="li"
- />
<li>
<Link
activeClassName="active"