GothenburgBitFactory / GothenburgBitFactory/taskwarrior

[Tracking] Hook API v3

Open
#3,852 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
6.1k
Forks
423
Avg merge
1d 19h
Merged PRs (30d)
11

Description

# Obvious improvements/Bug fixes (non-breaking)
- [ ] Understand all correct JSON return values
- [ ] https://github.com/GothenburgBitFactory/taskwarrior/issues/2832
- [ ] https://github.com/GothenburgBitFactory/taskwarrior/issues/2744

# API improvements (breaking)
- [ ] Move the default hooks location
- [ ] https://github.com/GothenburgBitFactory/taskwarrior/issues/2431
- [ ] https://github.com/GothenburgBitFactory/taskwarrior/issues/1779
I interpret this, as proposing to move the hook types from the filename to a parent directory (`on-add_hook.sh` -> `on-add/hook.sh`).

- [ ] Pass structured JSON arguments to hooks
- [ ] https://github.com/GothenburgBitFactory/taskwarrior/issues/3839
- [ ] https://github.com/GothenburgBitFactory/taskwarrior/issues/3840
- [ ] https://github.com/GothenburgBitFactory/taskwarrior/issues/1912

- [ ] [Parse, don't validate](https://lexi-lambda.github.io/blog/2019/11/05/parse-don-t-validate/)
- [ ] https://github.com/GothenburgBitFactory/taskwarrior/issues/3851

# Add further hook types (non-breaking)
- [ ] `on-urgency-calc`
- [ ] https://github.com/GothenburgBitFactory/taskwarrior/issues/3214

- [ ] Teach `on-launch`, how to modify TW's command line
- [ ] https://github.com/GothenburgBitFactory/taskwarrior/issues/2281

- [ ] `on-sync`
- [ ] https://github.com/GothenburgBitFactory/taskwarrior/issues/2142
(also see [Open Questions](#open_questions))
- [ ] `on-unblock`
- [ ] https://github.com/GothenburgBitFactory/taskwarrior/issues/1815

# Open Questions
- Task created through recurrence [trigger hooks](https://github.com/GothenburgBitFactory/taskwarrior/issues/1546)
This is obviously useful, but also quite unexpected if the task is, for example, created in a `task list` run

- Task revived by synchronizing do [not trigger hooks](https://github.com/GothenburgBitFactory/taskwarrior/issues/2142)
This would be useful, for a mobile client but could also result in infinite loops via two or more desktop clients.
- A possible [solution via taskchampion](https://github.com/GothenburgBitFactory/taskwarrior/discussions/3235#discussioncomment-7969404)

- Should the hook handling be [factored out into a shared library](https://github.com/GothenburgBitFactory/taskwarrior/issues/3838)?

- Can hooks be separated [into _filters_ and _triggers_](https://github.com/GothenburgBitFactory/taskwarrior/discussions/3235#discussion-6001362)?
This would make it easy to add more hook types, if these were mere triggers.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.