mirror of
https://github.com/actions/stale.git
synced 2025-12-30 11:58:18 +00:00
optimize pull request
This commit is contained in:
@@ -27,10 +27,13 @@ export class ExemptDraftPullRequest {
|
||||
)} is enabled`
|
||||
);
|
||||
|
||||
/* This code was used until Jun 15 2022 - it is unclear why they had to call API for getting pull request
|
||||
const pullRequest: IPullRequest | undefined | void =
|
||||
await pullRequestCallback();
|
||||
|
||||
if (pullRequest?.draft === true) {
|
||||
*/
|
||||
if (this._issue?.draft === true) {
|
||||
this._issueLogger.info(
|
||||
LoggerService.white('└──'),
|
||||
`Skip the $$type draft checks`
|
||||
|
||||
@@ -13,6 +13,7 @@ export class Issue implements IIssue {
|
||||
readonly number: number;
|
||||
created_at: IsoDateString;
|
||||
updated_at: IsoDateString;
|
||||
readonly draft: boolean;
|
||||
readonly labels: ILabel[];
|
||||
readonly pull_request: object | null | undefined;
|
||||
readonly state: string | 'closed' | 'open';
|
||||
@@ -33,6 +34,7 @@ export class Issue implements IIssue {
|
||||
this.number = issue.number;
|
||||
this.created_at = issue.created_at;
|
||||
this.updated_at = issue.updated_at;
|
||||
this.draft = issue.draft || false;
|
||||
this.labels = mapLabels(issue.labels);
|
||||
this.pull_request = issue.pull_request;
|
||||
this.state = issue.state;
|
||||
|
||||
Reference in New Issue
Block a user