diff --git a/tests/ui/job-view/bugfiler_test.jsx b/tests/ui/job-view/bugfiler_test.jsx index 56db41edcb4..c09b4a2fd67 100644 --- a/tests/ui/job-view/bugfiler_test.jsx +++ b/tests/ui/job-view/bugfiler_test.jsx @@ -121,6 +121,7 @@ describe('BugFiler', () => { successCallback={successCallback} selectedJob={selectedJob} platform={selectedJob.platform} + currentRepo={{ name: 'autoland' }} notify={() => {}} /> @@ -139,6 +140,7 @@ describe('BugFiler', () => { successCallback={successCallback} selectedJob={selectedJob} platform={selectedJob.platform} + currentRepo={{ name: 'autoland' }} notify={() => {}} /> diff --git a/ui/shared/BugFiler.jsx b/ui/shared/BugFiler.jsx index a230c93e2e0..06bcc973bf3 100644 --- a/ui/shared/BugFiler.jsx +++ b/ui/shared/BugFiler.jsx @@ -42,6 +42,7 @@ export class BugFilerClass extends React.Component { parsedLog, reftestUrl, selectedJob, + currentRepo, } = props; const allFailures = suggestions.map((sugg) => @@ -188,9 +189,13 @@ export class BugFilerClass extends React.Component { } } + if (currentRepo.name === 'try') { + summaryString = `[non-prod] ${summaryString}`; + } + this.state = { tooltipOpen: {}, - summary: `Intermittent ${summaryString}`, + summary: `Intermittent [non-prod] ${summaryString}`, productSearch: null, suggestedProducts: [], isFilerSummaryVisible: false, @@ -1005,7 +1010,7 @@ BugFilerClass.propTypes = { platform: PropTypes.string.isRequired, notify: PropTypes.func.isRequired, selectedJob: PropTypes.shape({}).isRequired, - currentRepo: PropTypes.string.isRequired, + currentRepo: PropTypes.shape({}).isRequired, }; const mapStateToProps = ({ pushes: { decisionTaskMap } }) => ({ diff --git a/ui/shared/InternalIssueFiler.jsx b/ui/shared/InternalIssueFiler.jsx index bd330c0dc3a..03e0eabca91 100644 --- a/ui/shared/InternalIssueFiler.jsx +++ b/ui/shared/InternalIssueFiler.jsx @@ -20,7 +20,7 @@ export class InternalIssueFilerClass extends React.Component { constructor(props) { super(props); - const { suggestion, jobGroupName, jobTypeName } = props; + const { suggestion, jobGroupName, jobTypeName, currentRepo } = props; const parsedSummary = parseSummary(suggestion); let summaryString = parsedSummary[0].join(' | '); @@ -128,6 +128,9 @@ export class InternalIssueFilerClass extends React.Component { } } + if (currentRepo.name === 'try') { + summaryString = `[non-prod] ${summaryString}`; + } this.state = { summary: `Intermittent ${summaryString}`, }; @@ -215,6 +218,7 @@ InternalIssueFilerClass.propTypes = { jobTypeName: PropTypes.string.isRequired, successCallback: PropTypes.func.isRequired, notify: PropTypes.func.isRequired, + currentRepo: PropTypes.shape({}).isRequired, }; export default connect(null, { notify })(InternalIssueFilerClass); diff --git a/ui/shared/tabs/failureSummary/FailureSummaryTab.jsx b/ui/shared/tabs/failureSummary/FailureSummaryTab.jsx index 05e9b241910..aac27eb23ba 100644 --- a/ui/shared/tabs/failureSummary/FailureSummaryTab.jsx +++ b/ui/shared/tabs/failureSummary/FailureSummaryTab.jsx @@ -381,6 +381,7 @@ class FailureSummaryTab extends React.Component { jobGroupName={selectedJob.job_group_name} jobTypeName={selectedJob.job_type_name} successCallback={this.internalIssueFilerCallback} + currentRepo={currentRepo} /> )}