A file-based task manager
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Auto git-push after `tsk assign`

Mirrors the auto-pull on `tsk inbox`: assign now pushes refs to "origin"
by default after writing the cross-namespace inbox blob, so the assignee
sees the item on their next inbox check. `-r NAME` selects a different
remote; `-r ""` skips the push.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

+19 -3
+19 -3
src/main.rs
··· 253 253 254 254 /// Assign a task to another namespace by sending it to that namespace's 255 255 /// inbox. Defaults to the top-of-stack task; use -T to pick a different 256 - /// one. Sets `assigned=[[<ns>/tsk-N]]` on the source. 256 + /// one. Sets `assigned=[[<ns>/tsk-N]]` on the source. Auto-pushes refs 257 + /// to "origin" when configured; pass -r NAME to use a different remote 258 + /// or -r "" to skip the push. 257 259 Assign { 258 260 /// Target namespace. 259 261 target: String, 260 262 #[command(flatten)] 261 263 task_id: TaskId, 264 + #[arg(short = 'r')] 265 + remote: Option<String>, 262 266 }, 263 267 264 268 /// List tasks pending in the current namespace's inbox. Pulls from a ··· 527 531 Commands::GitSetup { gitignore, remote } => command_git_setup(dir, gitignore, remote), 528 532 Commands::GitPush { remote } => command_git_push(dir, remote), 529 533 Commands::GitPull { remote } => command_git_pull(dir, remote), 530 - Commands::Assign { target, task_id } => command_assign(dir, target, task_id), 534 + Commands::Assign { 535 + target, 536 + task_id, 537 + remote, 538 + } => command_assign(dir, target, task_id, remote), 531 539 Commands::Inbox { remote } => command_inbox(dir, remote), 532 540 Commands::Accept { key } => command_accept(dir, key), 533 541 Commands::Reject { key } => command_reject(dir, key), ··· 928 936 Ok(()) 929 937 } 930 938 931 - fn command_assign(dir: PathBuf, target: String, task_id: TaskId) -> Result<()> { 939 + fn command_assign( 940 + dir: PathBuf, 941 + target: String, 942 + task_id: TaskId, 943 + remote: Option<String>, 944 + ) -> Result<()> { 932 945 let ws = Workspace::from_path(dir)?; 933 946 let id = ws.task(task_id.into())?.id; 934 947 let key = ws.export_to_namespace(&target, id)?; 935 948 eprintln!("Sent {id} to namespace '{target}' (inbox key: {key})"); 949 + if let Some(r) = effective_remote(&ws, remote)? { 950 + ws.git_push_refs(&r)?; 951 + } 936 952 Ok(()) 937 953 } 938 954