|
24 | 24 | resolve_linear_api_token, |
25 | 25 | ) |
26 | 26 | from context import assemble_prompt, fetch_github_issue |
27 | | -from jira_reactions import comment_task_started |
| 27 | +from jira_reactions import ( |
| 28 | + comment_task_started, |
| 29 | + transition_pr_opened, |
| 30 | + transition_task_started, |
| 31 | +) |
28 | 32 | from linear_reactions import react_task_finished, react_task_started |
29 | 33 | from models import AgentResult, HydratedContext, RepoSetup, TaskConfig, TaskResult |
30 | 34 | from observability import current_otel_trace_id, task_span |
@@ -863,6 +867,14 @@ def _on_trace_truncated(max_bytes: int, first_dropped: int) -> None: |
863 | 867 | config.channel_metadata, |
864 | 868 | ) |
865 | 869 |
|
| 870 | + # Move the Jira card To Do → In Progress so the board reflects that |
| 871 | + # work has started (issue #572). No-op for non-Jira tasks. |
| 872 | + # Best-effort; failures are logged and never block the pipeline. |
| 873 | + transition_task_started( |
| 874 | + config.channel_source, |
| 875 | + config.channel_metadata, |
| 876 | + ) |
| 877 | + |
866 | 878 | # Download attachments from S3 (version-pinned, integrity-verified) |
867 | 879 | prepared_attachments: list = [] |
868 | 880 | if config.attachments: |
@@ -1058,6 +1070,14 @@ def _on_trace_truncated(max_bytes: int, first_dropped: int) -> None: |
1058 | 1070 | post_span.set_attribute("pr.url", pr_url or "") |
1059 | 1071 | if pr_url: |
1060 | 1072 | progress.write_agent_milestone("pr_created", pr_url) |
| 1073 | + # Move the Jira card In Progress → In Review now that a PR is |
| 1074 | + # open (issue #572). Only fires when a PR was actually opened — |
| 1075 | + # failed / no-PR tasks leave the card where humans can see the |
| 1076 | + # failure comment. No-op for non-Jira tasks; best-effort. |
| 1077 | + transition_pr_opened( |
| 1078 | + config.channel_source, |
| 1079 | + config.channel_metadata, |
| 1080 | + ) |
1061 | 1081 |
|
1062 | 1082 | # Memory write — capture task episode and repo learnings |
1063 | 1083 | memory_written = False |
|
0 commit comments