refactor: out core

This commit is contained in:
元凛
2022-02-10 14:40:31 +08:00
parent 2b4519585f
commit bdb9ee8890
5 changed files with 9 additions and 27 deletions

View File

@@ -1,5 +1,4 @@
import { Octokit } from '@octokit/rest';
import * as core from '../core';
import { EEmoji } from '../shared';
import { TEmoji, TLockReasons, TUpdateMode, TIssueState, TUserPermission } from '../types';
import { IIssueBaseInfo, IIssueCoreEngine, IListIssuesParams, TIssueList, TIssueInfo, TCommentList } from './types';
@@ -15,8 +14,7 @@ export class IssueCoreEngine implements IIssueCoreEngine {
this.owner = _info.owner;
this.repo = _info.repo;
this.issueNumber = _info.issueNumber;
const token = core.getInput('token');
this.octokit = new Octokit({ auth: `token ${token}` });
this.octokit = new Octokit({ auth: `token ${_info.token}` });
} else {
console && console.error && console.error(`Init failed, need owner、repo!`);
}