abort the build on the error
This commit is contained in:
parent
7769eadff1
commit
6bc202284c
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
|
@ -38,7 +38,9 @@
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.0",
|
"@actions/core": "^1.10.0",
|
||||||
"@actions/github": "^5.0.1",
|
"@actions/github": "^5.1.1",
|
||||||
|
"@octokit/core": "^4.2.0",
|
||||||
|
"@octokit/plugin-retry": "^4.1.1",
|
||||||
"lodash.deburr": "^4.1.0",
|
"lodash.deburr": "^4.1.0",
|
||||||
"semver": "^7.3.5"
|
"semver": "^7.3.5"
|
||||||
},
|
},
|
||||||
|
|
|
@ -25,6 +25,7 @@ import {StaleOperations} from './stale-operations';
|
||||||
import {Statistics} from './statistics';
|
import {Statistics} from './statistics';
|
||||||
import {LoggerService} from '../services/logger.service';
|
import {LoggerService} from '../services/logger.service';
|
||||||
import {OctokitIssue} from '../interfaces/issue';
|
import {OctokitIssue} from '../interfaces/issue';
|
||||||
|
import {retry} from '@octokit/plugin-retry';
|
||||||
|
|
||||||
/***
|
/***
|
||||||
* Handle processing of issues for staleness/closure.
|
* Handle processing of issues for staleness/closure.
|
||||||
|
@ -74,7 +75,7 @@ export class IssuesProcessor {
|
||||||
|
|
||||||
constructor(options: IIssuesProcessorOptions) {
|
constructor(options: IIssuesProcessorOptions) {
|
||||||
this.options = options;
|
this.options = options;
|
||||||
this.client = getOctokit(this.options.repoToken);
|
this.client = getOctokit(this.options.repoToken, {}, retry);
|
||||||
this.operations = new StaleOperations(this.options);
|
this.operations = new StaleOperations(this.options);
|
||||||
|
|
||||||
this._logger.info(
|
this._logger.info(
|
||||||
|
@ -556,8 +557,7 @@ export class IssuesProcessor {
|
||||||
(issue: Readonly<OctokitIssue>): Issue => new Issue(this.options, issue)
|
(issue: Readonly<OctokitIssue>): Issue => new Issue(this.options, issue)
|
||||||
);
|
);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this._logger.error(`Get issues for repo error: ${error.message}`);
|
throw Error(`Get issues for repo error: ${error.message}`);
|
||||||
return Promise.resolve([]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue