|
23 | 23 | resolve_linear_api_token, |
24 | 24 | ) |
25 | 25 | from context import assemble_prompt, fetch_github_issue |
26 | | -from jira_reactions import comment_task_started |
| 26 | +from jira_reactions import ( |
| 27 | + comment_task_started, |
| 28 | + transition_pr_opened, |
| 29 | + transition_task_started, |
| 30 | +) |
27 | 31 | from linear_reactions import react_task_finished, react_task_started |
28 | 32 | from models import AgentResult, HydratedContext, RepoSetup, TaskConfig, TaskResult |
29 | 33 | from observability import current_otel_trace_id, task_span |
@@ -880,6 +884,14 @@ def _on_trace_truncated(max_bytes: int, first_dropped: int) -> None: |
880 | 884 | config.channel_metadata, |
881 | 885 | ) |
882 | 886 |
|
| 887 | + # Move the Jira card To Do → In Progress so the board reflects that |
| 888 | + # work has started (issue #572). No-op for non-Jira tasks. |
| 889 | + # Best-effort; failures are logged and never block the pipeline. |
| 890 | + transition_task_started( |
| 891 | + config.channel_source, |
| 892 | + config.channel_metadata, |
| 893 | + ) |
| 894 | + |
883 | 895 | # Download attachments from S3 (version-pinned, integrity-verified) |
884 | 896 | prepared_attachments: list = [] |
885 | 897 | if config.attachments: |
@@ -1075,6 +1087,14 @@ def _on_trace_truncated(max_bytes: int, first_dropped: int) -> None: |
1075 | 1087 | post_span.set_attribute("pr.url", pr_url or "") |
1076 | 1088 | if pr_url: |
1077 | 1089 | progress.write_agent_milestone("pr_created", pr_url) |
| 1090 | + # Move the Jira card In Progress → In Review now that a PR is |
| 1091 | + # open (issue #572). Only fires when a PR was actually opened — |
| 1092 | + # failed / no-PR tasks leave the card where humans can see the |
| 1093 | + # failure comment. No-op for non-Jira tasks; best-effort. |
| 1094 | + transition_pr_opened( |
| 1095 | + config.channel_source, |
| 1096 | + config.channel_metadata, |
| 1097 | + ) |
1078 | 1098 |
|
1079 | 1099 | # Memory write — capture task episode and repo learnings |
1080 | 1100 | memory_written = False |
|
0 commit comments