mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-19 18:25:58 +08:00
fix: getIssue
This commit is contained in:
3
dist/index.js
vendored
3
dist/index.js
vendored
@@ -15673,7 +15673,7 @@ class IssueCoreEngine {
|
|||||||
repo,
|
repo,
|
||||||
issue_number: issueNumber,
|
issue_number: issueNumber,
|
||||||
});
|
});
|
||||||
return issue.data;
|
return issue;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
getUserPermission(username) {
|
getUserPermission(username) {
|
||||||
@@ -15756,7 +15756,6 @@ class IssueCoreEngine {
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
const { owner, repo, octokit, issueNumber, getIssue } = this;
|
const { owner, repo, octokit, issueNumber, getIssue } = this;
|
||||||
const issue = yield getIssue();
|
const issue = yield getIssue();
|
||||||
console.log(issue);
|
|
||||||
const baseLabels = issue.labels.map(({ name }) => name);
|
const baseLabels = issue.labels.map(({ name }) => name);
|
||||||
const removeLabels = baseLabels.filter(name => labels.includes(name));
|
const removeLabels = baseLabels.filter(name => labels.includes(name));
|
||||||
for (const label of removeLabels) {
|
for (const label of removeLabels) {
|
||||||
|
@@ -136,7 +136,7 @@ export class IssueCoreEngine implements IIssueCoreEngine {
|
|||||||
repo,
|
repo,
|
||||||
issue_number: issueNumber,
|
issue_number: issueNumber,
|
||||||
});
|
});
|
||||||
return issue.data as TIssueInfo;
|
return issue as unknown as TIssueInfo;
|
||||||
}
|
}
|
||||||
|
|
||||||
public async getUserPermission(username: string) {
|
public async getUserPermission(username: string) {
|
||||||
@@ -217,7 +217,6 @@ export class IssueCoreEngine implements IIssueCoreEngine {
|
|||||||
public async removeLabels(labels: string[]) {
|
public async removeLabels(labels: string[]) {
|
||||||
const { owner, repo, octokit, issueNumber, getIssue } = this;
|
const { owner, repo, octokit, issueNumber, getIssue } = this;
|
||||||
const issue = await getIssue();
|
const issue = await getIssue();
|
||||||
console.log(issue)
|
|
||||||
|
|
||||||
const baseLabels: string[] = issue.labels.map(({ name }) => name);
|
const baseLabels: string[] = issue.labels.map(({ name }) => name);
|
||||||
const removeLabels = baseLabels.filter(name => labels.includes(name));
|
const removeLabels = baseLabels.filter(name => labels.includes(name));
|
||||||
|
Reference in New Issue
Block a user