Skip to content

Reduce nags about PRs that reference issues but don't fix them. - #16112

Merged
jacob314 merged 3 commits into
mainfrom
pr_triage2
Jan 8, 2026
Merged

Reduce nags about PRs that reference issues but don't fix them.#16112
jacob314 merged 3 commits into
mainfrom
pr_triage2

Conversation

@jacob314

@jacob314 jacob314 commented Jan 7, 2026

Copy link
Copy Markdown
Contributor

Summary

PRs such as #15948 where getting incorrectly tagged as needing an issue when they referenced but didn't fully resolve an issue.

Details

Check for references to PRs in the issue content if the PR doesnt explicitly fix an issue.

How to Validate

Run the tool on just issue and validate it doesn't get tagged as needing an issue.

Case I used to verify:

│ 🔄 Processing PR #15948                                                                                                                                                                        │
│ 🔗 Found referenced issue #15951 in PR body                                                                                                                                                    │
│ 🔗 Found linked issue #15951                                                                                                                                                                   │
│ https://github.com/google-gemini/gemini-cli/pull/15948                                                                                                                                         │
│ 📥 Fetching area and priority labels from issue #15951                                                                                                                                         │
│ 📥 Extracting labels from PR #15948                                                                                                                                                            │
│    Issue labels (area/priority): area/core                                                                                                                                                     │
│    PR labels: status/need-issue                                                                                                                                                                │
│ ➕ Adding labels: area/core                                                                                                                                                                    │
│ https://github.com/google-gemini/gemini-cli/pull/15948                                                                                                                                         │
│ ✅ PR triage completed                                                                                                                                                                         │
│ needs_comment=false                                                                                                                                                                            │
│ prs_needing_comment=[]                                                                                                                                                                         ```

@jacob314
jacob314 requested a review from a team as a code owner January 7, 2026 23:59
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @jacob314, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the PR triage script to reduce unnecessary notifications for pull requests that reference issues without explicitly marking them as 'fixing' them. It achieves this by enhancing the script's ability to detect referenced issues within the PR body and by optimizing API calls to fetch PR details, resulting in a more accurate and efficient automated triage process.

Highlights

  • Enhanced Issue Detection: The PR triage script now intelligently scans the pull request body for issue references (e.g., fix .env check #123) if no explicit closingIssuesReferences are found, improving the accuracy of issue association.
  • Optimized API Calls: A redundant gh pr view API call for fetching PR labels has been eliminated. Labels are now extracted from the PR_DATA object that is already retrieved, leading to more efficient script execution.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request improves the PR triage script by reducing API calls and adding logic to detect issue references in the PR body, which is a great enhancement. I've found one potential issue with the regular expression used for detecting issue numbers, which could lead to false positives. My feedback includes a suggestion to make the pattern matching more precise.

Comment thread .github/scripts/pr-triage.sh Outdated
@github-actions

github-actions Bot commented Jan 8, 2026

Copy link
Copy Markdown

Size Change: -2 B (0%)

Total Size: 22.3 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 22.2 MB -2 B (0%)
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB 0 B
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-closed.sb 3.29 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B

compressed-size-action

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@jacob314
jacob314 requested a review from scidomino January 8, 2026 00:04
@gemini-cli gemini-cli Bot added the status/need-issue Pull requests that need to have an associated issue. label Jan 8, 2026
@jacob314
jacob314 added this pull request to the merge queue Jan 8, 2026
Merged via the queue into main with commit 41cc6cf Jan 8, 2026
26 checks passed
@jacob314
jacob314 deleted the pr_triage2 branch January 8, 2026 01:05
sumansaurabh pushed a commit to sumansaurabh/gemini-cli that referenced this pull request Jan 9, 2026
…le-gemini#16112)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
thacio added a commit to thacio/auditaria that referenced this pull request Jan 24, 2026
kuishou68 pushed a commit to iOfficeAI/gemini-cli-pro that referenced this pull request Feb 27, 2026
…le-gemini#16112)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
cocosheng-g pushed a commit that referenced this pull request May 6, 2026
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@sripasg sripasg added the size/s A small PR label Jun 2, 2026
software-0ficial pushed a commit to software-0ficial/gemini-cli that referenced this pull request Jul 9, 2026
…le-gemini#16112)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s A small PR status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants