Skip to content

fix: refetch current issue state before assignment bots assign users - #2237

Open
chaitanyamedidar wants to merge 3 commits into
hiero-ledger:mainfrom
chaitanyamedidar:fix/assignment-bots-fresh-issue-state
Open

chaitanyamedidar wants to merge 3 commits into
hiero-ledger:mainfrom
chaitanyamedidar:fix/assignment-bots-fresh-issue-state

Conversation

@chaitanyamedidar

Copy link
Copy Markdown

Description:

This PR updates the GFI and beginner assignment bots to refetch the current GitHub issue state immediately before calling addAssignees.

This avoids making the final assignment decision from a stale issue_comment.created webhook payload when another queued workflow run may have already assigned the issue.

Changes:

  • Refetch current issue state before final assignment in the GFI assignment bot.
  • Refetch current issue state before final assignment in the beginner assignment bot.
  • Fail safely if the current issue state cannot be fetched.
  • Recheck current labels and assignees before assigning.
  • Add a focused regression test for stale payload assignment behavior.
    Related issue(s):

Fixes #2230

Notes for reviewer:

This intentionally keeps the Python fix small. It follows the same safety pattern used in the C++ assignment workflow: check the payload first, then refetch current issue state before the final write. I did not port the broader C++ workflow structure in this PR.

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Copilot AI review requested due to automatic review settings May 5, 2026 20:05
@chaitanyamedidar
chaitanyamedidar requested review from a team as code owners May 5, 2026 20:05
@codacy-production

codacy-production Bot commented May 5, 2026 •

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 18 complexity

Metric Results
Complexity 18

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@coderabbitai

coderabbitai Bot commented May 5, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
Commits

Reviewing files that changed from the base of the PR and between 2c3efad and 17ae9f7.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

The assignment flow now fetches the current issue before assigning. It stops when the fetch fails, the skill label changed, the issue is not open, or the issue already has an assignee. On successful assignment, it passes the refreshed issue to the CodeRabbit plan trigger.

Changes

Fresh issue state for assignment

Layer / File(s) Summary
Fetch issue from GitHub
.github/scripts/shared/api/github-api.js
Adds and exports getIssue, which fetches an issue by owner, repository, and issue number and returns the API response data.
Gate assignment on refreshed issue
.github/scripts/shared/core/issue-assign.js, .github/scripts/__tests__/jest/issue-assign.test.js
The assignment flow checks the fetched issue before assigning and uses it for the already-assigned notice and CodeRabbit plan trigger. Tests cover fetch failure, changed skill label, closed state, and existing assignees.

Priority: Pending latest changes

Estimated code review effort: 3 (Moderate) | ~20 minutes

Severity of issue fixed: Medium

Sequence Diagram(s)

sequenceDiagram
  participant AssignmentFlow
  participant GitHubAPI
  participant CodeRabbit
  AssignmentFlow->>GitHubAPI: Fetch current issue
  GitHubAPI-->>AssignmentFlow: Return issue state, labels, and assignees
  alt Issue is eligible and unassigned
    AssignmentFlow->>GitHubAPI: Assign issue
    AssignmentFlow->>CodeRabbit: Trigger plan with refreshed issue
  else Issue is ineligible or already assigned
    AssignmentFlow->>AssignmentFlow: Stop assignment flow
  end
Loading
Merge Risk: Minimal · previous review 2c3ef

The change is mergeable. An existing early check can still reject an issue after its assignee is removed.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title names the main change: the assignment bots now refetch the current issue state before assigning users. It follows the conventional commit style, is concise, and matches the summary of change…
Description check Passed The description states that the GFI and beginner assignment bots now refetch current issue state before calling addAssignees. It lists the changes, including fail-safe handling, label and assignee rec…
Linked Issues check Passed Issue #2230 requires both assignment bots to use current assignees, labels, and issue state before the final assignment. The shared runAssignmentFlow now calls getIssue after the prerequisite and …
Out of Scope Changes check Passed The changes stay within issue #2230. The added getIssue API helper supports the required refetch. The shared assignment-flow change applies the behavior to the GFI and beginner bots. The updated Jes…
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Full details: Title check

Explanation

The title names the main change: the assignment bots now refetch the current issue state before assigning users. It follows the conventional commit style, is concise, and matches the summary of changes and objectives.

Full details: Description check

Explanation

The description states that the GFI and beginner assignment bots now refetch current issue state before calling addAssignees. It lists the changes, including fail-safe handling, label and assignee rechecks, and a regression test. This matches the changeset.

Full details: Linked Issues check

Explanation

Issue #2230 requires both assignment bots to use current assignees, labels, and issue state before the final assignment. The shared runAssignmentFlow now calls getIssue after the prerequisite and limit checks, stops when the refreshed issue is not open, no longer has the required skill label, or has assignees, and calls assignIssue only after those checks. The fetch failure path returns without assignment. The Jest tests cover assigned, unavailable, missing-label, and closed refreshed issues.

Full details: Out of Scope Changes check

Explanation

The changes stay within issue #2230. The added getIssue API helper supports the required refetch. The shared assignment-flow change applies the behavior to the GFI and beginner bots. The updated Jest tests verify the required safety paths and assignment behavior. No unrelated change is shown in the supplied pull request evidence.

Full details: Docstring Coverage

Explanation

Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 1 functions across 3 files.

Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/scripts/bot-gfi-assign-on-comment.js (1)

396-423: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Add a refreshed open-state check before final assignment write.

Line 396 revalidates labels and Line 401 revalidates assignees, but currentIssue.state is not checked before addAssignees. A delayed run can still assign a closed issue.

Suggested patch
         if (!issueIsGoodFirstIssue(currentIssue)) {
             console.log('[gfi-assign] Exit: current issue state is no longer a Good First Issue');
             return;
         }

+        if (currentIssue.state !== 'open') {
+            console.log('[gfi-assign] Exit: current issue state is not open', {
+                issueNumber,
+                state: currentIssue.state,
+            });
+            return;
+        }
+
         if (currentIssue.assignees?.length > 0) {
             console.log('[gfi-assign] Exit: current issue state is already assigned');
.github/scripts/bot-beginner-assign-on-comment.js (1)

362-393: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Gate on refreshed issue.state before addAssignees.

Line 362 checks refreshed label and Line 367 checks refreshed assignees, but there is no open-state check before assignment. In queued runs, this can still assign a closed issue.

Suggested patch
       if (!issueHasBeginnerLabel(currentIssue)) {
         console.log(`[Beginner Bot] Issue #${issue.number} no longer has '${BEGINNER_LABEL}' label. Exiting.`);
         return;
       }

+      if (currentIssue.state !== "open") {
+        console.log(`[Beginner Bot] Issue #${issue.number} is '${currentIssue.state}'. Exiting.`);
+        return;
+      }
+
       if (currentIssue.assignees && currentIssue.assignees.length > 0) {

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: cc8e6c03-8c02-45b5-bad1-372dbc242d78

📥 Commits

Reviewing files that changed from the base of the PR and between 79b34a7 and c71e516.

📒 Files selected for processing (2)
  • .github/scripts/bot-beginner-assign-on-comment.js
  • .github/scripts/bot-gfi-assign-on-comment.js

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR hardens the GitHub Actions assignment bots against stale issue_comment.created webhook payloads by refetching the current issue state immediately before performing the final addAssignees write.

Changes:

  • Add a “fresh issue state” refetch in the GFI assignment bot before assigning, and re-check labels/assignees.
  • Add a similar refetch + re-check flow in the beginner assignment bot (including a helper for beginner label detection).
  • On refetch failure, exit safely without attempting assignment.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/scripts/bot-gfi-assign-on-comment.js Refetches current issue state before assignment; revalidates GFI label + assignees; uses fresh issue object for follow-on CodeRabbit trigger.
.github/scripts/bot-beginner-assign-on-comment.js Adds beginner-label helper and refetches current issue state before assignment to avoid decisions based on stale webhook data.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@chaitanyamedidar

Copy link
Copy Markdown
Author

Hi @explorer3, I checked the C++ assignment workflow and saw it already uses a similar safety pattern to what we discussed for Python: it refetches the current issue state before the final assignment write, so queued /assign runs do not rely only on the original webhook payload.

I’ve implemented the Python fix in the same small scope and added a focused regression test for the stale-payload case. Would you prefer that test file to be included in the PR as repo-side regression coverage, or should I keep the PR limited to the two bot script changes?

@github-actions

github-actions Bot commented May 6, 2026

Copy link
Copy Markdown

Hello, this is the OfficeHourBot.

This is a reminder that the Hiero Python SDK Office Hours are scheduled in approximately 4 hours (14:00 UTC).

This session provides an opportunity to ask questions regarding this Pull Request.

Details:

Disclaimer: This is an automated reminder. Please verify the schedule here for any changes.

From,
The Python SDK Team

@exploreriii exploreriii added step: 1st 1st stage of the review approval process reviewer: community pull requests looking for community reviews labels May 6, 2026
@darshit2308

Copy link
Copy Markdown
Contributor

LGTM ! Everything looks fine to me.

Just few notes we should consider for future polish :

Expanded Test Coverage
The test framework you set up in bot-assignment-fresh-issue.test.js is awesome. Since the mocks are already perfectly wired up, it would be great to add two quick test cases to cover the new defensive paths you added:

  1. The API failure path (when getFreshIssue throws).

  2. The Label-churn path (when the fresh issue no longer has the required label).

@chaitanyamedidar

Copy link
Copy Markdown
Author

Hey @darshit2308 , thanks for the suggestion.

This will document the concurrency edge cases directly in tests, which is valuable because this PR is specifically about stale webhook state

Added focused coverage for both defensive paths in bot-assignment-fresh-issue.test.js

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/scripts/bot-beginner-assign-on-comment.js (2)

279-295: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Avoid making the “already assigned” decision from stale webhook state.

At Line [279], the bot returns based on context.payload.issue.assignees before the fresh fetch at Line [351]. If the webhook snapshot is stale (assignee removed later), /assign is incorrectly blocked.

Suggested fix
-      // --- ASSIGNMENT LOGIC ---
-      if (issue.assignees && issue.assignees.length > 0) {
-        try{
-          await github.rest.issues.createComment({
-            owner: repo.owner.login,
-            repo: repo.name,
-            issue_number: issue.number,
-            body: buildAlreadyAssignedComment({ commenter, issue, repo }),
-          });
-        } catch (error) {
-          console.error("[Beginner Bot] Failed to post already-assigned message:", {
-            issue: issue.number,
-            commenter,
-            message: error.message,
-          });
-        }
-        return;
-      }
+      // --- ASSIGNMENT LOGIC ---
+      // Defer assignee decision until after fresh issue fetch.

367-397: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Revalidate fresh issue state before calling addAssignees.

Lines [367]-[397] recheck label and assignees, but not currentIssue.state. A closed issue can still pass this gate and be assigned.

Suggested fix
       if (!issueHasBeginnerLabel(currentIssue)) {
         console.log(`[Beginner Bot] Issue #${issue.number} no longer has '${BEGINNER_LABEL}' label. Exiting.`);
         return;
       }
+
+      if (currentIssue.state !== "open") {
+        console.log(`[Beginner Bot] Issue #${issue.number} is '${currentIssue.state}'. Exiting.`);
+        return;
+      }

       if (currentIssue.assignees && currentIssue.assignees.length > 0) {

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 5cef04dd-d5ea-4218-b763-b999603d8292

📥 Commits

Reviewing files that changed from the base of the PR and between c71e516 and ae81c81.

📒 Files selected for processing (2)
  • .github/scripts/bot-assignment-fresh-issue.test.js
  • .github/scripts/bot-beginner-assign-on-comment.js

@github-actions github-actions Bot added the queue:junior-committer PR awaiting initial quality review label May 8, 2026
@exploreriii exploreriii removed step: 1st 1st stage of the review approval process reviewer: community pull requests looking for community reviews labels May 8, 2026
@github-actions github-actions Bot added the open to community review PR is open for community review and feedback label May 9, 2026

@aceppaluni aceppaluni left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@chaitanyamedidar Do you have links to your testing?

@chaitanyamedidar

Copy link
Copy Markdown
Author

@aceppaluni I tested it locally with: node --test

The focused regression test is here:
https://github.com/chaitanyamedidar/hiero-sdk-python/blob/fix/assignment-bots-fresh-issue-state/.github/scripts/bot-assignment-fresh-issue.test.js

This uses mocked Octokit/event replay, so the stale payload case is deterministic. I can also paste the local test command/output here if that would be more useful.

@aceppaluni

Copy link
Copy Markdown
Contributor

@chaitanyamedidar Yes, if you could paste the output this would be appreciated! It helps to ensure the bot is working smoothly.

Overall this is looking pretty good. Once the output is pasted ill review again. Ill keep an eye out.

Thank you

@chaitanyamedidar

Copy link
Copy Markdown
Author

Hey @aceppaluni and @cheese-cakee
I'm in the middle of my semester exams currently, I'll get back to this PR as soon as I get time if that's alright.
Apologies for the delay.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
.github/scripts/bot-beginner-assign-on-comment.js (1)

279-295: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Consider removing the early already-assigned check to ensure all decisions use fresh issue state.

This check reads issue.assignees from the webhook payload, which can be stale for queued workflow runs. Lines 377-393 perform the definitive already-assigned check using the freshly refetched currentIssue. The early check here is redundant and creates a potential false-negative edge case: if the payload is stale in the opposite direction (shows assigned when the issue is actually unassigned), this early exit would incorrectly block assignment.

Removing this block would align with the stated objective of "verify current issue state from the GitHub API before the final assignment decision" and match the consistency recommendation from cheese-cakee's feedback.

♻️ Proposed removal
-      // --- ASSIGNMENT LOGIC ---
-      if (issue.assignees && issue.assignees.length > 0) {
-        try{
-          await github.rest.issues.createComment({
-            owner: repo.owner.login,
-            repo: repo.name,
-            issue_number: issue.number,
-            body: buildAlreadyAssignedComment({ commenter, issue, repo }),
-          });
-        } catch (error) {
-          console.error("[Beginner Bot] Failed to post already-assigned message:", {
-            issue: issue.number,
-            commenter,
-            message: error.message,
-          });
-        }
-        return;
-      }
-
.github/scripts/bot-gfi-assign-on-comment.js (1)

323-335: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick win

Consider removing the early already-assigned check to ensure all decisions use fresh issue state.

This check reads issue.assignees from the webhook payload, which can be stale for queued workflow runs. Lines 409-421 perform the definitive already-assigned check using the freshly refetched currentIssue. The early check here is redundant and creates a potential false-negative edge case: if the payload is stale in the opposite direction (shows assigned when the issue is actually unassigned), this early exit would incorrectly block assignment.

Removing this block would align with the stated objective of "verify current issue state from the GitHub API before the final assignment decision" and match the consistency recommendation from cheese-cakee's feedback.

♻️ Proposed removal
-        // Reject if issue is already assigned
-        // Comment failure to the requester
-        if (issue.assignees?.length > 0) {
-            console.log('[gfi-assign] Exit: issue already assigned');
-
-            await github.rest.issues.createComment({
-                owner,
-                repo,
-                issue_number: issueNumber,
-                body: commentAlreadyAssigned(requesterUsername, issue),
-            });
-
-            console.log('[gfi-assign] Posted already-assigned comment');
-            return;
-        }
-

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: faa1afde-e3f0-4fdb-924a-be2518f8b842

📥 Commits

Reviewing files that changed from the base of the PR and between ae81c81 and 4522767.

📒 Files selected for processing (3)
  • .github/scripts/bot-assignment-fresh-issue.test.js
  • .github/scripts/bot-beginner-assign-on-comment.js
  • .github/scripts/bot-gfi-assign-on-comment.js

@aceppaluni
aceppaluni marked this pull request as draft May 13, 2026 21:00
@aceppaluni

Copy link
Copy Markdown
Contributor

@chaitanyamedidar No problem, will mark this as draft for now. Good luck with your exams!!

@github-actions

Copy link
Copy Markdown

Hi @chaitanyamedidar,

This pull request has had no commit activity for 10 days. Are you still working on it?
To keep the PR active, you can:

  • Push a new commit.
  • Comment /working on the linked issue (not this PR).

If you're no longer working on this, please comment /unassign on the linked issue to release it for others. Otherwise, this PR may be closed due to inactivity.

Reach out on discord or join our office hours if you need assistance.

From the Python SDK Team

@github-actions

Copy link
Copy Markdown

Hi @chaitanyamedidar,

This pull request has had no activity for 10 days. Are you still working on it?
To keep the PR active, you can:

  • Push a new commit.
  • Comment /working on the linked issue (not this PR).

If you're no longer working on this, please comment /unassign on the linked issue to release it for others. Otherwise, this PR may be closed due to inactivity.

Reach out on discord or join our office hours if you need assistance.

From the Python SDK Team

@aceppaluni

Copy link
Copy Markdown
Contributor

@chaitanyamedidar Are you still planning to work on this?

@chaitanyamedidar

Copy link
Copy Markdown
Author

Hello @aceppaluni, sorry for the delayed response. Yes, I intend to work on it. However, it could take a while. If this work is required to be completed urgently, I'd kindly request one of the members to take on this work.

@aceppaluni

Copy link
Copy Markdown
Contributor

@chaitanyamedidar No problem, I wanted to make sure our bots did not close this on you if you had been working.

Thank you for letting us know!

@github-actions

Copy link
Copy Markdown

Hi @chaitanyamedidar,

This pull request has had no activity for 10 days. Are you still working on it?
To keep the PR active, you can:

  • Push a new commit.
  • Comment /working on the linked issue (not this PR).

If you're no longer working on this, please comment /unassign on the linked issue to release it for others. Otherwise, this PR may be closed due to inactivity.

Reach out on discord or join our office hours if you need assistance.

From the Python SDK Team

@chaitanyamedidar

Copy link
Copy Markdown
Author

/working

@aceppaluni

Copy link
Copy Markdown
Contributor

@chaitanyamedidar If you are still working on this please comment /working only on the issue as it is not counted when commented in the PR.

If you have any questions please let me know. Thank you!

@chaitanyamedidar

Copy link
Copy Markdown
Author

@aceppaluni Noted.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown

Hi @chaitanyamedidar,

This pull request has had no activity for 10 days. Are you still working on it?
To keep the PR active, you can:

  • Push a new commit.
  • Comment /working on the linked issue (not this PR).

If you're no longer working on this, please comment /unassign on the linked issue to release it for others. Otherwise, this PR may be closed due to inactivity.

Reach out on discord or join our office hours if you need assistance.

From the Python SDK Team

1 similar comment
@github-actions

Copy link
Copy Markdown

Hi @chaitanyamedidar,

This pull request has had no activity for 10 days. Are you still working on it?
To keep the PR active, you can:

  • Push a new commit.
  • Comment /working on the linked issue (not this PR).

If you're no longer working on this, please comment /unassign on the linked issue to release it for others. Otherwise, this PR may be closed due to inactivity.

Reach out on discord or join our office hours if you need assistance.

From the Python SDK Team

@aceppaluni

Copy link
Copy Markdown
Contributor

@chaitanyamedidar Are you still working on this?

@chaitanyamedidar
chaitanyamedidar force-pushed the fix/assignment-bots-fresh-issue-state branch from d0c2af8 to 9a5fd1a Compare September 25, 2026 09:16
Signed-off-by: chaitanyamedidar <175808937+chaitanyamedidar@users.noreply.github.com>
@chaitanyamedidar

Copy link
Copy Markdown
Author

@aceppaluni @exploreriii PR is up for review, thank you for being patient here!

@github-actions

github-actions Bot commented Oct 5, 2026

Copy link
Copy Markdown

Hi @chaitanyamedidar,

This pull request has had no activity for 10 days. Are you still working on it?
To keep the PR active, you can:

  • Push a new commit.
  • Comment /working on the linked issue (not this PR).

If you're no longer working on this, please comment /unassign on the linked issue to release it for others. Otherwise, this PR may be closed due to inactivity.

Reach out on discord or join our office hours if you need assistance.

From the Python SDK Team

@github-actions

Copy link
Copy Markdown

Hi @chaitanyamedidar,

This pull request has had no activity for 10 days. Are you still working on it?
To keep the PR active, you can:

  • Push a new commit.
  • Comment /working on the linked issue (not this PR).

If you're no longer working on this, please comment /unassign on the linked issue to release it for others. Otherwise, this PR may be closed due to inactivity.

Reach out on discord or join our office hours if you need assistance.

From the Python SDK Team

@aceppaluni

Copy link
Copy Markdown
Contributor

@chaitanyamedidar Are you still working on this?

@aceppaluni

Copy link
Copy Markdown
Contributor

@chaitanyamedidar Are you still working on this? If not no problem, we will close this PR. Thank you.

@chaitanyamedidar

Copy link
Copy Markdown
Author

Hi @aceppaluni, I've made the changes at request. I'd appreciate your and others review on the same. Thanks!

@aceppaluni @exploreriii PR is up for review, thank you for being patient here!

@aceppaluni
aceppaluni marked this pull request as ready for review October 28, 2026 20:06
@aceppaluni

Copy link
Copy Markdown
Contributor

@chaitanyamedidar can you update your branch when you have a moment please? Thank you

@chaitanyamedidar

Copy link
Copy Markdown
Author

@aceppaluni done.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


Review info
Run configuration
Commits

Reviewing files that changed from the base of the PR and between 4522767 and 2c3efad.

Files selected for processing: 3
  • .github/scripts/__tests__/jest/issue-assign.test.js
  • .github/scripts/shared/api/github-api.js
  • .github/scripts/shared/core/issue-assign.js

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

// /assign runs, but their webhook payload stays stale.
let currentIssue;
try {
currentIssue = await getIssue({ github, owner, repo: repoName, issueNumber });

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor · Functional Correctness · Quick win

Check the current issue before rejecting an assigned webhook issue.

If an assignee is removed while a /assign run waits, the webhook issue can still show that assignee. The existing isAssigned branch at Lines 198–203 then posts an incorrect already-assigned notice and returns before this fetch. Check current state before that rejection, and retain a fetch immediately before the assignment write. (raw.githubusercontent.com)

@github-actions github-actions Bot added open to community review PR is open for community review and feedback queue:committers PR awaiting committer technical review Good First Issue Issues which are ideal for a first time or new project contributor. labels Oct 28, 2026
@github-actions

github-actions Bot commented Nov 8, 2026

Copy link
Copy Markdown

Hi @chaitanyamedidar,

This pull request has had no activity for 10 days. Are you still working on it?
To keep the PR active, you can:

  • Push a new commit.
  • Comment /working on the linked issue (not this PR).

If you're no longer working on this, please comment /unassign on the linked issue to release it for others. Otherwise, this PR may be closed due to inactivity.

Reach out on discord or join our office hours if you need assistance.

From the Python SDK Team

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Good First Issue Issues which are ideal for a first time or new project contributor. open to community review PR is open for community review and feedback queue:committers PR awaiting committer technical review status: Needs Developer Revision Author needs to apply suggested changes/improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Assignment bots should refetch issue state before final assignment decision

7 participants