Skip to content

fix(github): send get_issue label filters as one comma-separated value - #2359

Merged
rapids-bot[bot] merged 1 commit into
NVIDIA:developfrom
abhishekacharya200:fix-github-get-issue-labels
Oct 16, 2026
Merged

rapids-bot[bot] merged 1 commit into
NVIDIA:developfrom
abhishekacharya200:fix-github-get-issue-labels

Conversation

@abhishekacharya200

@abhishekacharya200 abhishekacharya200 commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Description

The github function group's get_issue passed labels to httpx as a list. httpx sends a list as a repeated query parameter (labels=bug&labels=Needs%20Triage), but the GitHub list-issues endpoint reads labels as one comma-separated value and keeps only the last one. A filter for several labels therefore returned issues that have only the last label. get_issue now joins the labels into one value (labels=bug,Needs%20Triage) before sending the request.

I checked this against the live API on this repository: labels=bug&labels=Needs%20Triage returns the same issues as labels=Needs%20Triage (including feature request and doc issues), while labels=bug,Needs%20Triage returns only issues with both labels.

Added test_get_issue_sends_labels_as_one_comma_separated_value in packages/nvidia_nat_core/tests/nat/tools/test_github_tools.py. It builds the function group with an httpx.MockTransport and checks the query string. It fails on develop (['bug', 'Needs Triage']) and passes with the fix.

Validation (Python 3.12):

  • pytest packages/nvidia_nat_core/tests/nat/tools: 50 passed, 7 skipped (49 passed, 7 skipped on develop).
  • yapf --diff and ruff check on both changed files: no changes or findings.

Closes #2358

Maintainer metadata: please add the bug and non-breaking labels.

By Submitting this PR I confirm:

  • I am familiar with the Contributing Guidelines.
  • We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license.
    • Any contribution which contains commits that are not Signed-Off will not be accepted.
  • When the PR is ready for review, new or existing tests cover these changes.
  • When the PR is ready for review, the documentation is up to date with these changes.

Summary by CodeRabbit

  • Bug Fixes
    • GitHub issue searches now handle multiple labels together as a comma-separated filter. For example, searching with both bug and Needs Triage sends them as one labels filter, while other issue search criteria remain unchanged.

The GitHub list-issues endpoint reads `labels` as a single comma-separated
value. get_issue passed the label list straight to httpx, which repeats the
query parameter (labels=a&labels=b), and GitHub then filters by the last
label only. Join the labels before sending the request.

Signed-off-by: abhishekacharya200 <abhishekacharya200@users.noreply.github.com>
@abhishekacharya200
abhishekacharya200 requested a review from a team as a code owner October 16, 2026 05:48
@copy-pr-bot

copy-pr-bot Bot commented Oct 16, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@coderabbitai

coderabbitai Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review in Change Stack β†’

No actionable comments were generated in the recent review. πŸŽ‰

ℹ️ Recent review info
βš™οΈ Run configuration
  • Configuration used: Repository: NVIDIA/NeMo-Agent-Toolkit/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Enterprise
  • Run ID: 0f63e406-70ff-46e6-86b8-9446632dc23d
πŸ“₯ Commits

Reviewing files that changed from the base of the PR and between efbcaa6 and e17c534.

πŸ“’ Files selected for processing: 2
  • packages/nvidia_nat_core/src/nat/tool/github_tools.py
  • packages/nvidia_nat_core/tests/nat/tools/test_github_tools.py

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

Walkthrough

get_issue now sends multiple labels as one comma-separated query parameter. A new async test checks the request parameter, request count, and parsed response.

Changes

GitHub issue label query

Layer / File(s) Summary
Serialize and test issue labels
packages/nvidia_nat_core/src/nat/tool/github_tools.py, packages/nvidia_nat_core/tests/nat/tools/test_github_tools.py
get_issue joins labels into one comma-separated query value. The async test checks that the request contains one labels parameter with both labels and verifies the parsed response.

Priority: βž– Normal

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Bug fix Β· Severity of issue fixed: Medium

Merge Risk: βšͺ Minimal Β· up to e17c5

Multiple requested labels are now sent as one comma-separated value, with a request-level test checking the query shape. No actionable merge-blocking risk is evident in the reviewed changes.

Pre-merge checks: Passed 4 Β· Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 16.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 2 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title is concise, descriptive, under approximately 72 characters, and uses imperative mood. It accurately describes the change to send GitHub issue label filters as one comma-separated value.
Linked Issues check Passed Issue #2358 requires get_issue to send multiple labels as one comma-separated value. In github_tools.py, the change joins params["labels"] before client.get. The new test verifies that bug a…
Out of Scope Changes check Passed The pull request changes only the get_issue query construction and adds a regression test for the linked issue behavior. The test and import changes support issue #2358. No unrelated change is shown…
  • Fix all pre-merge checks with AI
✨ Finishing Touches: πŸ’‘ 1
πŸ› οΈ Fix failing CI checks: πŸ’‘
  • Commit to this branch
  • Create a new PR
πŸ§ͺ Generate unit tests (beta)
  • Create a new PR
  • Autofix Β· Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@willkill07 willkill07 added bug Something isn't working non-breaking Non-breaking change labels Oct 16, 2026
@willkill07

Copy link
Copy Markdown
Member

/ok to test e17c534

@willkill07

Copy link
Copy Markdown
Member

/merge

@rapids-bot
rapids-bot Bot merged commit 7923fe8 into NVIDIA:develop Oct 16, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: github get_issue filters by only the last label when several labels are given

2 participants