From 20dcf6fe50344afdbad36adf67a474e737fdf8ce Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 07:08:47 +0000 Subject: [PATCH 1/3] Initial plan From afbac012d85b4eba9208c8a0028524ef24c52f5f Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 07:10:47 +0000 Subject: [PATCH 2/3] Fix rate limit interaction: increase per-user limit to 12 and unify max responses check Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> --- .github/issue-assistant/src/security.js | 5 +++-- .github/workflows/issue-assistant.yml | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/issue-assistant/src/security.js b/.github/issue-assistant/src/security.js index 917e8274..d05350be 100644 --- a/.github/issue-assistant/src/security.js +++ b/.github/issue-assistant/src/security.js @@ -183,6 +183,7 @@ async function validateRequest({ context, maxInputLength, rateLimitPerHour, + maxBotResponses, customInjectionPatterns, customSuspiciousPatterns }) { @@ -226,7 +227,7 @@ async function validateRequest({ errors.push('Rate limit exceeded'); } - if (comment) { + if (comment && maxBotResponses) { const { data: comments } = await github.rest.issues.listComments({ owner: context.repo.owner, repo: context.repo.repo, @@ -237,7 +238,7 @@ async function validateRequest({ c.body && c.body.includes('') ); - if (botComments.length >= 3) { + if (botComments.length >= maxBotResponses) { errors.push('Maximum bot responses reached'); } } diff --git a/.github/workflows/issue-assistant.yml b/.github/workflows/issue-assistant.yml index 0e2e6920..9a355f8b 100644 --- a/.github/workflows/issue-assistant.yml +++ b/.github/workflows/issue-assistant.yml @@ -19,7 +19,7 @@ env: MAX_INPUT_LENGTH: 10000 MAX_BOT_RESPONSES: 4 MIN_RESPONSE_INTERVAL_SECONDS: 120 - RATE_LIMIT_PER_USER_PER_HOUR: 10 + RATE_LIMIT_PER_USER_PER_HOUR: 12 jobs: validate-and-triage: @@ -283,6 +283,7 @@ jobs: context, maxInputLength: parseInt(process.env.MAX_INPUT_LENGTH), rateLimitPerHour: parseInt(process.env.RATE_LIMIT_PER_USER_PER_HOUR), + maxBotResponses: parseInt(process.env.MAX_BOT_RESPONSES), customInjectionPatterns: injectionPatterns }); From eb8306bf9dbb5ed5d34822e639dcb449facf0f75 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 11 Feb 2026 07:12:14 +0000 Subject: [PATCH 3/3] Fix maxBotResponses check to handle undefined correctly Co-authored-by: DimaBir <28827735+DimaBir@users.noreply.github.com> --- .github/issue-assistant/src/security.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/issue-assistant/src/security.js b/.github/issue-assistant/src/security.js index d05350be..a4d3f9b9 100644 --- a/.github/issue-assistant/src/security.js +++ b/.github/issue-assistant/src/security.js @@ -227,7 +227,7 @@ async function validateRequest({ errors.push('Rate limit exceeded'); } - if (comment && maxBotResponses) { + if (comment && maxBotResponses !== undefined) { const { data: comments } = await github.rest.issues.listComments({ owner: context.repo.owner, repo: context.repo.repo,