Skip to content

Comments

feat: add pr url to task object when pr made in twig#538

Merged
k11kirky merged 1 commit intomainfrom
01-19-feat_add_pr_url_to_task_object_when_pr_made_in_twig
Jan 20, 2026
Merged

feat: add pr url to task object when pr made in twig#538
k11kirky merged 1 commit intomainfrom
01-19-feat_add_pr_url_to_task_object_when_pr_made_in_twig

Conversation

@k11kirky
Copy link
Contributor

@k11kirky k11kirky commented Jan 20, 2026

TL;DR

Added automatic detection and tracking of GitHub PR URLs created during agent tasks.

What changed?

  • Added a new detectAndAttachPrUrl method to the AgentService class that:
    • Monitors bash tool execution results for GitHub PR URLs
    • Extracts PR URLs using regex pattern matching
    • Attaches detected PR URLs to the corresponding task
    • Calls the agent's attachPullRequestToTask method to update the task
  • Integrated this detection into the existing message handling flow

How to test?

  1. Run an agent task that creates a GitHub PR using bash commands
  2. Verify that the PR URL is automatically detected in the bash output
  3. Check that the PR URL is properly attached to the task
  4. Confirm that webhook tracking is enabled for the PR

Why make this change?

This enhancement enables webhook tracking by automatically populating the pr_url in TaskRun output when an agent creates a GitHub PR. Previously, PR URLs created during agent tasks weren't automatically tracked, requiring manual intervention. This change improves the workflow by automatically detecting and linking PRs to their originating tasks.

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@k11kirky k11kirky marked this pull request as ready for review January 20, 2026 05:49
@k11kirky k11kirky requested a review from a team as a code owner January 20, 2026 05:49
@k11kirky k11kirky merged commit 44d5712 into main Jan 20, 2026
12 checks passed
@k11kirky k11kirky deleted the 01-19-feat_add_pr_url_to_task_object_when_pr_made_in_twig branch January 20, 2026 05:54
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