mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-24 04:29:11 +08:00
5
dist/index.js
vendored
5
dist/index.js
vendored
@@ -8060,7 +8060,7 @@ async function doMarkDuplicate(owner, repo, labels) {
|
|||||||
commentBody.split(' ')[0] == duplicateCommand) ||
|
commentBody.split(' ')[0] == duplicateCommand) ||
|
||||||
testDuplicate(commentBody))
|
testDuplicate(commentBody))
|
||||||
) {
|
) {
|
||||||
|
try {
|
||||||
const res = await octokit.repos.getCollaboratorPermissionLevel({
|
const res = await octokit.repos.getCollaboratorPermissionLevel({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
@@ -8104,6 +8104,9 @@ async function doMarkDuplicate(owner, repo, labels) {
|
|||||||
if (closeIssue == 'true') {
|
if (closeIssue == 'true') {
|
||||||
await doCloseIssue(owner, repo, issueNumber);
|
await doCloseIssue(owner, repo, issueNumber);
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
core.info(error.message);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
core.info(
|
core.info(
|
||||||
`This comment body should start whith 'duplicate-command' or 'Duplicate of' and not include '?'`,
|
`This comment body should start whith 'duplicate-command' or 'Duplicate of' and not include '?'`,
|
||||||
|
@@ -197,6 +197,7 @@ async function doMarkDuplicate(owner, repo, labels) {
|
|||||||
commentBody.split(' ')[0] == duplicateCommand) ||
|
commentBody.split(' ')[0] == duplicateCommand) ||
|
||||||
testDuplicate(commentBody))
|
testDuplicate(commentBody))
|
||||||
) {
|
) {
|
||||||
|
try {
|
||||||
const res = await octokit.repos.getCollaboratorPermissionLevel({
|
const res = await octokit.repos.getCollaboratorPermissionLevel({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
@@ -240,6 +241,9 @@ async function doMarkDuplicate(owner, repo, labels) {
|
|||||||
if (closeIssue == 'true') {
|
if (closeIssue == 'true') {
|
||||||
await doCloseIssue(owner, repo, issueNumber);
|
await doCloseIssue(owner, repo, issueNumber);
|
||||||
}
|
}
|
||||||
|
} catch (error) {
|
||||||
|
core.info(error.message);
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
core.info(
|
core.info(
|
||||||
`This comment body should start whith 'duplicate-command' or 'Duplicate of' and not include '?'`,
|
`This comment body should start whith 'duplicate-command' or 'Duplicate of' and not include '?'`,
|
||||||
|
Reference in New Issue
Block a user