mirror of
https://gitea.com/Lydanne/issues-helper.git
synced 2025-08-21 19:25:46 +08:00
fix: api request limit (#57)
This commit is contained in:
17
dist/index.js
vendored
17
dist/index.js
vendored
@@ -8005,7 +8005,7 @@ async function doCreateLabel(owner, repo) {
|
|||||||
});
|
});
|
||||||
core.info(`Actions: [create-label][${name}] success!`);
|
core.info(`Actions: [create-label][${name}] success!`);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err.message)
|
console.log(err.message);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8053,6 +8053,14 @@ async function doMarkDuplicate(owner, repo, labels) {
|
|||||||
|
|
||||||
const ifCommandInput = !!duplicateCommand;
|
const ifCommandInput = !!duplicateCommand;
|
||||||
|
|
||||||
|
if (
|
||||||
|
!commentBody.includes('?') &&
|
||||||
|
((ifCommandInput &&
|
||||||
|
commentBody.startsWith(duplicateCommand) &&
|
||||||
|
commentBody.split(' ')[0] == duplicateCommand) ||
|
||||||
|
testDuplicate(commentBody))
|
||||||
|
) {
|
||||||
|
|
||||||
const res = await octokit.repos.getCollaboratorPermissionLevel({
|
const res = await octokit.repos.getCollaboratorPermissionLevel({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
@@ -8064,13 +8072,6 @@ async function doMarkDuplicate(owner, repo, labels) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
|
||||||
!commentBody.includes('?') &&
|
|
||||||
((ifCommandInput &&
|
|
||||||
commentBody.startsWith(duplicateCommand) &&
|
|
||||||
commentBody.split(' ')[0] == duplicateCommand) ||
|
|
||||||
testDuplicate(commentBody))
|
|
||||||
) {
|
|
||||||
if (ifCommandInput) {
|
if (ifCommandInput) {
|
||||||
const nextBody = commentBody.replace(duplicateCommand, 'Duplicate of');
|
const nextBody = commentBody.replace(duplicateCommand, 'Duplicate of');
|
||||||
await doUpdateComment(owner, repo, commentId, nextBody, 'replace', true);
|
await doUpdateComment(owner, repo, commentId, nextBody, 'replace', true);
|
||||||
|
14
src/base.js
14
src/base.js
@@ -190,6 +190,13 @@ async function doMarkDuplicate(owner, repo, labels) {
|
|||||||
|
|
||||||
const ifCommandInput = !!duplicateCommand;
|
const ifCommandInput = !!duplicateCommand;
|
||||||
|
|
||||||
|
if (
|
||||||
|
!commentBody.includes('?') &&
|
||||||
|
((ifCommandInput &&
|
||||||
|
commentBody.startsWith(duplicateCommand) &&
|
||||||
|
commentBody.split(' ')[0] == duplicateCommand) ||
|
||||||
|
testDuplicate(commentBody))
|
||||||
|
) {
|
||||||
const res = await octokit.repos.getCollaboratorPermissionLevel({
|
const res = await octokit.repos.getCollaboratorPermissionLevel({
|
||||||
owner,
|
owner,
|
||||||
repo,
|
repo,
|
||||||
@@ -201,13 +208,6 @@ async function doMarkDuplicate(owner, repo, labels) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (
|
|
||||||
!commentBody.includes('?') &&
|
|
||||||
((ifCommandInput &&
|
|
||||||
commentBody.startsWith(duplicateCommand) &&
|
|
||||||
commentBody.split(' ')[0] == duplicateCommand) ||
|
|
||||||
testDuplicate(commentBody))
|
|
||||||
) {
|
|
||||||
if (ifCommandInput) {
|
if (ifCommandInput) {
|
||||||
const nextBody = commentBody.replace(duplicateCommand, 'Duplicate of');
|
const nextBody = commentBody.replace(duplicateCommand, 'Duplicate of');
|
||||||
await doUpdateComment(owner, repo, commentId, nextBody, 'replace', true);
|
await doUpdateComment(owner, repo, commentId, nextBody, 'replace', true);
|
||||||
|
Reference in New Issue
Block a user