Made it so excessive bugs are not created from regression runs (#943)
This commit is contained in:
parent
2791150daf
commit
88bad7cf7f
1 changed files with 7 additions and 3 deletions
|
|
@ -6,6 +6,8 @@ import OrtoniReport, { OrtoniReportConfig } from "ortoni-report";
|
|||
|
||||
let jiraCardNumber = process.env.JIRA_CARD_NUMBER || '';
|
||||
const isRegressionRun = process.env.IS_REGRESSION === 'true'? true: false;
|
||||
const isCreateBugSubtasks = !isRegressionRun; // DO NOT create anything for a regression run. Temporary for this project. In library package, this will be a config option.
|
||||
const isCreateTestSubtasks = !isRegressionRun;
|
||||
const jiraProjectKey = process.env.JIRA_PROJECT_KEY!;
|
||||
const jiraEpicKey = process.env.JIRA_EPIC_KEY!;
|
||||
const passTransitionId = '111';
|
||||
|
|
@ -374,7 +376,7 @@ export default class JiraWritebackReporter implements Reporter {
|
|||
|
||||
const subTask = this.getCreateTestSubtask(test, result); // Will return undefined if test status is 'skipped'
|
||||
const bug = this.getCreateBug(test, result); // Will return undefined if we don't need one
|
||||
if (subTask) {
|
||||
if (subTask && isCreateTestSubtasks) {
|
||||
// Create or Edit Subtask
|
||||
if (existingTestSubtask) {
|
||||
if (result.status === 'passed') {
|
||||
|
|
@ -390,7 +392,7 @@ export default class JiraWritebackReporter implements Reporter {
|
|||
}
|
||||
}
|
||||
|
||||
if (bug) {
|
||||
if (bug && isCreateBugSubtasks) {
|
||||
// Create or Edit Bug
|
||||
if (existingBug) {
|
||||
// Leave it alone. This reporter should not modify existing bugs.
|
||||
|
|
@ -409,7 +411,9 @@ export default class JiraWritebackReporter implements Reporter {
|
|||
*/
|
||||
onTestEnd(test: TestCase, result: TestResult) {
|
||||
this.ortoniReport.onTestEnd(test, result);
|
||||
this.loadIssueCalls.push(() => { this.loadIssue(test, result); });
|
||||
if (isCreateBugSubtasks || isCreateTestSubtasks) { // IF any type of subtasks should be created/modified, call loadIssue(). Otherwise, do not call it.
|
||||
this.loadIssueCalls.push(() => { this.loadIssue(test, result); });
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue