Исправлены ошибки линтера
This commit is contained in:
parent
ea8115cbee
commit
d43cc54f56
1 changed files with 23 additions and 6 deletions
|
|
@ -33,8 +33,15 @@ export class CalendarEnhancer implements IssueEnhancerInterface {
|
||||||
public descriptionCalendarParams: DescriptionParserParams,
|
public descriptionCalendarParams: DescriptionParserParams,
|
||||||
public calendarEventsKey: string,
|
public calendarEventsKey: string,
|
||||||
) {
|
) {
|
||||||
const initParams = {useForProjects, customFields, descriptionCalendarParams, calendarEventsKey};
|
const initParams = {
|
||||||
this.logger.debug(`Calendar enhancer init with ${JSON.stringify(initParams)}`);
|
useForProjects,
|
||||||
|
customFields,
|
||||||
|
descriptionCalendarParams,
|
||||||
|
calendarEventsKey,
|
||||||
|
};
|
||||||
|
this.logger.debug(
|
||||||
|
`Calendar enhancer init with ${JSON.stringify(initParams)}`,
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
async enhance(
|
async enhance(
|
||||||
|
|
@ -49,10 +56,18 @@ export class CalendarEnhancer implements IssueEnhancerInterface {
|
||||||
try {
|
try {
|
||||||
res[this.calendarEventsKey] = this.getCalendarEvents(res);
|
res[this.calendarEventsKey] = this.getCalendarEvents(res);
|
||||||
} catch (ex) {
|
} catch (ex) {
|
||||||
this.logger.error(`Error at parsing calendar events, message - ${ex}: ${(ex as Error)?.stack}`);
|
this.logger.error(
|
||||||
|
`Error at parsing calendar events, message - ${ex}: ${
|
||||||
|
(ex as Error)?.stack
|
||||||
|
}`,
|
||||||
|
);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
this.logger.debug(`Calendar events for #${issue.id}: issue.${this.calendarEventsKey} = ${JSON.stringify(res[this.calendarEventsKey])}`);
|
this.logger.debug(
|
||||||
|
`Calendar events for #${issue.id}: issue.${
|
||||||
|
this.calendarEventsKey
|
||||||
|
} = ${JSON.stringify(res[this.calendarEventsKey])}`,
|
||||||
|
);
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
@ -147,7 +162,9 @@ export class CalendarEnhancer implements IssueEnhancerInterface {
|
||||||
|
|
||||||
const lines = text.split('\n').map((line) => line.trim());
|
const lines = text.split('\n').map((line) => line.trim());
|
||||||
|
|
||||||
const calendarStartIndex = lines.indexOf(this.descriptionCalendarParams.title);
|
const calendarStartIndex = lines.indexOf(
|
||||||
|
this.descriptionCalendarParams.title,
|
||||||
|
);
|
||||||
if (calendarStartIndex < 0) return [];
|
if (calendarStartIndex < 0) return [];
|
||||||
|
|
||||||
let index = calendarStartIndex + 1;
|
let index = calendarStartIndex + 1;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue