Skip to content

fix(ten-427): fall back to PR branch/title for TEN issue matching#18

Open
marvin-tensorleap wants to merge 1 commit into
ten-334-github-webhook-dispatcherfrom
ten-427-webhook-fallback
Open

fix(ten-427): fall back to PR branch/title for TEN issue matching#18
marvin-tensorleap wants to merge 1 commit into
ten-334-github-webhook-dispatcherfrom
ten-427-webhook-fallback

Conversation

@marvin-tensorleap
Copy link
Copy Markdown
Collaborator

Summary

  • 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.
  • Adds extractTenIdentifierFromPR to parse the PR's head branch name and title for a TEN-NNN identifier, and findTenIssueByIdentifier to look it up by exact identifier match.
  • The fallback is tried only when the primary full-text search returns no result.

Test plan

Closes TEN-427

🤖 Generated with Claude Code

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants