Skip to content

Commit 6e82bac

Browse files
committed
Bug 1967756 - add [non-prod] to summary string when filing an intermittent issue from try.
1 parent 2424ddc commit 6e82bac

File tree

4 files changed

+15
-3
lines changed

4 files changed

+15
-3
lines changed

tests/ui/job-view/bugfiler_test.jsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,7 @@ describe('BugFiler', () => {
121121
successCallback={successCallback}
122122
selectedJob={selectedJob}
123123
platform={selectedJob.platform}
124+
currentRepo={{name: 'autoland'}}
124125
notify={() => {}}
125126
/>
126127
</Provider>
@@ -139,6 +140,7 @@ describe('BugFiler', () => {
139140
successCallback={successCallback}
140141
selectedJob={selectedJob}
141142
platform={selectedJob.platform}
143+
currentRepo={{name: 'autoland'}}
142144
notify={() => {}}
143145
/>
144146
</Provider>

ui/shared/BugFiler.jsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ export class BugFilerClass extends React.Component {
4242
parsedLog,
4343
reftestUrl,
4444
selectedJob,
45+
currentRepo,
4546
} = props;
4647

4748
const allFailures = suggestions.map((sugg) =>
@@ -188,9 +189,13 @@ export class BugFilerClass extends React.Component {
188189
}
189190
}
190191

192+
if (currentRepo.name === 'try') {
193+
summaryString = `[non-prod] ${summaryString}`;
194+
}
195+
191196
this.state = {
192197
tooltipOpen: {},
193-
summary: `Intermittent ${summaryString}`,
198+
summary: `Intermittent [non-prod] ${summaryString}`,
194199
productSearch: null,
195200
suggestedProducts: [],
196201
isFilerSummaryVisible: false,
@@ -1005,7 +1010,7 @@ BugFilerClass.propTypes = {
10051010
platform: PropTypes.string.isRequired,
10061011
notify: PropTypes.func.isRequired,
10071012
selectedJob: PropTypes.shape({}).isRequired,
1008-
currentRepo: PropTypes.string.isRequired,
1013+
currentRepo: PropTypes.shape({}).isRequired,
10091014
};
10101015

10111016
const mapStateToProps = ({ pushes: { decisionTaskMap } }) => ({

ui/shared/InternalIssueFiler.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class InternalIssueFilerClass extends React.Component {
2020
constructor(props) {
2121
super(props);
2222

23-
const { suggestion, jobGroupName, jobTypeName } = props;
23+
const { suggestion, jobGroupName, jobTypeName, currentRepo } = props;
2424

2525
const parsedSummary = parseSummary(suggestion);
2626
let summaryString = parsedSummary[0].join(' | ');
@@ -128,6 +128,9 @@ export class InternalIssueFilerClass extends React.Component {
128128
}
129129
}
130130

131+
if (currentRepo.name === 'try') {
132+
summaryString = `[non-prod] ${summaryString}`;
133+
}
131134
this.state = {
132135
summary: `Intermittent ${summaryString}`,
133136
};
@@ -215,6 +218,7 @@ InternalIssueFilerClass.propTypes = {
215218
jobTypeName: PropTypes.string.isRequired,
216219
successCallback: PropTypes.func.isRequired,
217220
notify: PropTypes.func.isRequired,
221+
currentRepo: PropTypes.shape({}).isRequired,
218222
};
219223

220224
export default connect(null, { notify })(InternalIssueFilerClass);

ui/shared/tabs/failureSummary/FailureSummaryTab.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -381,6 +381,7 @@ class FailureSummaryTab extends React.Component {
381381
jobGroupName={selectedJob.job_group_name}
382382
jobTypeName={selectedJob.job_type_name}
383383
successCallback={this.internalIssueFilerCallback}
384+
currentRepo={currentRepo}
384385
/>
385386
)}
386387
</div>

0 commit comments

Comments
 (0)