fix(ten-427): fall back to PR branch/title for TEN issue matching#18
Open
marvin-tensorleap wants to merge 1 commit into
Open
fix(ten-427): fall back to PR branch/title for TEN issue matching#18marvin-tensorleap wants to merge 1 commit into
marvin-tensorleap wants to merge 1 commit into
Conversation
When an agent opens a PR without backfilling the GitHub ref into the issue description, `findTenIssue`'s text search misses the parent issue and creates a spurious triage issue instead of waking the assignee. Add `extractTenIdentifierFromPR` to parse the PR's head branch name and title for a TEN-NNN identifier (e.g. `ten-334-exact-match` or `fix(ten-334): …`), and `findTenIssueByIdentifier` to look it up by exact identifier match. The fallback is tried only when the primary full-text search returns no result. Three new tests cover: branch-based match for pull_request_review, title-based match for pull_request.opened, and triage-issue creation when neither branch nor title contains a TEN identifier. Co-Authored-By: Paperclip <noreply@paperclip.ing>
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
findTenIssue's text search misses the parent issue and creates a spurious triage issue instead of waking the assignee.extractTenIdentifierFromPRto parse the PR's head branch name and title for aTEN-NNNidentifier, andfindTenIssueByIdentifierto look it up by exact identifier match.Test plan
pull_request_review, title-based match forpull_request.opened, and triage-issue creation when neither branch nor title contains a TEN identifier.Closes TEN-427
🤖 Generated with Claude Code