-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(trello): Command to get the next step of each card (#24)
* refacto: get rid of the wrap() function * fix: throw error instead of returning text as usual * fix: export TrelloOptions * move test files next to their implementation file * test: getNextTrelloTasks returns the first task of the only card of a board * docs: add "How to add a command" tutorial (wip) * implement dummy getNextTrelloTasks() => test passes * write a small tool to examine the response from the 3rd-party API * docs: update steps 3 and 4 with links to examples * rename previous tool * add getNextTodoItem() + call it from tools/trello-checklist-get.ts * fix(vscode): exclude lib/ directory, especially for file search * make _getNextTrelloTasks() return actual results from Trello's API * docs: add step 5 with link to example * Oops, I had forgotten a hard-coded value * Make the automated test mock the API requests * docs: add step 6 with link to example * refactor: simplify nock code * refacto: extract mock functions for re-use * refactor: re-use API mocks * add traps in the test * ❌ test: "returns the first tasks of both cards of a board" * feat: return next steps for more than 1 card * update doc * ❌ test: it skips cards that don't have a checklist * fix test * ✅ implement: it skips cards that don't have a checklist * fix: .env is only used for firebase & telegram creds * test new command => document and ease debugging * fix: skip empty checklists * stricter assertions + remote TODOs * ❌ test:it skips cards that don't have a hashtag * ease debugging * _getNextTrelloTasks() fetches cards with tags => allow cards without description * fix error handling for addAsTrelloComment() * reduce redundant errors logging in tests * fix test "returns the first incomplete task of the only card of a board" => split extractCardFromTags() into fetchCardsWithTags() and fetchTargetedCards() * fix tests by adding tags to dummy cards * fix: make _getNextTrelloTasks() consider just cards that have tags * docs: move `/next #tag` command to TODO section * make tools runnable directly => remove them from package.json
- Loading branch information
1 parent
e908471
commit ece3b67
Showing
19 changed files
with
621 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.