Repository navigation
Conversation
extract_ticket_links_from_pr_description() accumulated issue URLs in a set, then applied the MAX_TICKETS cap by slicing list(set), which picks an arbitrary subset that can vary between runs. Track URLs in first-seen order while de-duplicating (mirroring find_jira_tickets), so the cap keeps a stable, predictable subset. Co-Authored-By: Claude
IsmaelMartinez
pushed a commit
that referenced
this pull request
Aug 28, 2026
… (The-PR-Agent#2492) * fix: scope ticket cache per-PR and fix Dynaconf list merge leaks in tests - Cache key is now 'related_tickets_<md5(pr_url)>' instead of global 'related_tickets', preventing stale tickets leaking between unrelated PRs - Added cache_tickets=true config flag under [pr_reviewer] to allow disabling - Fixed Dynaconf merge_enabled=True list append bug in both production code (env_bridge.py uses case-insensitive pop before set) and test helpers (restore_settings now calls _remove_key before every set) - Added azure-identity dependency for Azure DevOps provider availability - 1043 tests pass, 0 failures * Revert "fix: scope ticket cache per-PR and fix Dynaconf list merge leaks in tests" This reverts commit 7f0d154. * feat: support GitHub Checks API as output mechanism (The-PR-Agent#1400) Add `github.publish_as_check_run` config option (default `false`) that routes persistent tool output (review, describe, improve) to GitHub Check Runs instead of PR comments. Check runs appear in the dedicated Checks tab, reducing comment noise on the main PR conversation. - `GithubProvider.publish_persistent_comment` delegates to `_publish_check_run` when the flag is enabled - Check runs are created on first invocation and updated on subsequent calls (tracked per tool name via `_check_run_ids` dict) - Falls back to comments gracefully on API errors * fix: address bot review comments for Checks API (The-PR-Agent#1400) - Move _check_run_ids from class-level to instance-level dict - Use self.last_commit_id.sha instead of commit object - Remove unused headers variable (F841) - Add fallback to PR comment when check run API fails * fix: address remaining bot review comments for Checks API (The-PR-Agent#1400) - Use separate update_body without head_sha for PATCH requests - Truncate text payload to 65535 chars (GitHub API limit) * fix: remove exception details from log to avoid leaking API request info * fix: address review feedback - fix requestJsonAndCheck unpacking, persistent check-run lookup, add tests * docs: document publish_as_check_run and synchronize event in action setup * chore: remove accidentally added skpro submodule * chore: add skpro to gitignore * fix: address Qodo findings - guard last_commit_id with getattr, add check_run support to improve path * fix: address Qodo findings on check-run output clobbered and pagination - Add _next_page_url() helper and paginate _find_existing_check_run to follow GitHub Link header across pages (Qodo finding The-PR-Agent#8) - Pass name="config-errors" to handle_configurations_errors so it doesn't clobber other check-run output (Qodo finding #3) - Fix FakeMarkdownProvider to accept the new name kwarg --------- Co-authored-by: Utsab <utsab@pr-agent.dev>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
extract_ticket_links_from_pr_description()accumulates GitHub issue URLs in aset, then enforces the 3-ticket cap by slicinglist(github_tickets)[:3]. Because sets are unordered, the chosen subset can differ between runs, so which tickets get used for review context is nondeterministic when a PR description references more than 3 issues.Fix
Track URLs in first-seen order while de-duplicating (a
seenset plus an ordered list), then apply the cap by slicing the ordered list. Selection is now stable and predictable.Notes
Test plan
pytest tests/unittest/test_extract_issue_from_branch.pyCo-Authored-By: Claude