-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #330 from imdone/story/List-tasks-in-a-story/task/…
…If-no-story-is-given-list-the-stories-and-use-the-last-story-as-the-default-selection Story/list tasks in a story/task/if no story is given list the stories and use the last story as the default selection
- Loading branch information
Showing
62 changed files
with
891 additions
and
218 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Import tasks | ||
|
||
After collaborative design, import a story and story tasks from markdown | ||
|
||
## Tasks | ||
- [x] `./backlog` is the default project folder | ||
- [x] Initialize imdone in the backlog folder | ||
- [x] `<story-id>` should be the markdown title | ||
- [x] On import always remove the contents of the `backlog/story/<story-id>` | ||
- [x] Shold handle a file with the following format | ||
- [x] Make sure checked items are put in DONE list | ||
- [x] use `markdown-it.parse` to create AST | ||
- [x] Save story-id project path so it's available for starting a task | ||
- [ ] Refactor to domain |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# List tasks in a story | ||
|
||
List all the tasks in a story | ||
|
||
```bash | ||
npx imdone ls -p backlog -s <story-id> | ||
``` | ||
|
||
## Tasks | ||
|
||
- [ ] `./backlog` is the default project folder | ||
- Adds all content before `## Tasks` to story | ||
- [ ] Can also pass in the story id with the `-s <story-id> option | ||
- [ ] If no story is given list the stories and use the last story as the default selection | ||
- [ ] Produces output the same as input | ||
- [ ] Can also use a filter | ||
- [ ] Can output as JSON |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,11 @@ | ||
# Start task | ||
|
||
After collaborative design, import a story and story tasks from markdown | ||
Start a task by task-id | ||
|
||
## Tasks | ||
- [x] `./backlog` is the default project folder | ||
- [x] Initialize imdone in the backlog folder | ||
- [x] `<story-id>` should be the markdown title | ||
- [x] On import always remove the contents of the `backlog/story/<story-id>` | ||
- [x] Shold handle a file with the following format | ||
- [x] Make sure checked items are put in DONE list | ||
- [x] use `markdown-it.parse` to create AST | ||
- [x] Save story-id project path so it's available for starting a task | ||
- [ ] Refactor to domain | ||
|
||
- [ ] This should find the task and create a branch named `story/<sid>/task/<task filname>` | ||
- [ ] Move the task to the `DOING` list | ||
- [ ] If the branch exists, check it out | ||
- [ ] Set the task id in session so we know what to close | ||
- [ ] Save the branch name in session so we can check it out again |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = function (task) { | ||
const project = this.project | ||
const groups = [...new Set( | ||
project.getCards('meta.group = *').map((card) => card.meta.group && card.meta.group[0]) | ||
)].map(group => { | ||
const name = group | ||
const value = `"${group}"` | ||
return { name, value} | ||
}) | ||
return [{name: 'All tasks', value: '*'}, ...groups].map((group) => { | ||
const filterValue = encodeURIComponent(`meta.group = ${group.value} or tags = story`) | ||
return { | ||
title: group.name, | ||
action: function () { | ||
project.openUrl(`imdone://active.repo?filter=${filterValue}`) | ||
} | ||
} | ||
}) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = function (task) { | ||
const project = this.project | ||
return [] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
keepEmptyPriority: true | ||
code: | ||
include_lists: | ||
- TODO | ||
- DOING | ||
- DONE | ||
- PLANNING | ||
- FIXME | ||
- ARCHIVE | ||
- HACK | ||
- CHANGED | ||
- XXX | ||
- IDEA | ||
- NOTE | ||
- REVIEW | ||
- BACKLOG | ||
lists: | ||
- hidden: false | ||
ignore: false | ||
name: NOTE | ||
id: jea6phpllxpsj7m | ||
- name: BACKLOG | ||
hidden: false | ||
ignore: false | ||
id: jea67colm3nm22s | ||
- hidden: false | ||
name: TODO | ||
id: jea6phpllxpsj7j | ||
- hidden: false | ||
name: DOING | ||
id: jea6phpllxpsj7k | ||
- hidden: false | ||
ignore: false | ||
name: DONE | ||
id: jea6phpllxpsj7l | ||
settings: | ||
openIn: default | ||
customOpenIn: '' | ||
editorTheme: blackboard | ||
journalType: New File | ||
journalPath: tasks | ||
appendNewCardsTo: imdone-tasks.md | ||
newCardSyntax: HASHTAG | ||
replaceSpacesWith: '-' | ||
plugins: | ||
devMode: false | ||
journalTemplate: null | ||
theme: dark | ||
views: [] | ||
name: stories | ||
cards: | ||
colors: [] | ||
template: | | ||
<!-- created:${(new Date()).toISOString()} task-id:${sid} --> | ||
trackChanges: false | ||
metaNewLine: false | ||
addCompletedMeta: false | ||
addCheckBoxTasks: false | ||
doneList: DONE | ||
taskPrefix: '##' | ||
tagPrefix: + | ||
metaSep: ':' | ||
orderMeta: true | ||
maxLines: 6 | ||
addNewCardsToTop: true | ||
defaultList: TODO |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const generateRandomString = (length) => { | ||
let result = ''; | ||
const characters = | ||
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; | ||
const charactersLength = characters.length; | ||
for (let i = 0; i < length; i++) { | ||
result += characters.charAt(Math.floor(Math.random() * charactersLength)); | ||
} | ||
return result; | ||
}; | ||
|
||
module.exports = function (task) { | ||
const project = this.project | ||
return { | ||
sid: generateRandomString(5) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
module.exports = function (task) { | ||
const project = this.project | ||
const groups = [...new Set( | ||
project.getCards('meta.group = *').map((card) => card.meta.group && card.meta.group[0]) | ||
)].map(group => { | ||
const name = group | ||
const value = `"${group}"` | ||
return { name, value} | ||
}) | ||
return [{name: 'All tasks', value: '*'}, ...groups].map((group) => { | ||
const filterValue = encodeURIComponent(`meta.group = ${group.value} or tags = story`) | ||
return { | ||
title: group.name, | ||
action: function () { | ||
project.openUrl(`imdone://active.repo?filter=${filterValue}`) | ||
} | ||
} | ||
}) | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module.exports = function (task) { | ||
const project = this.project | ||
return [] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
keepEmptyPriority: true | ||
code: | ||
include_lists: | ||
- TODO | ||
- DOING | ||
- DONE | ||
- PLANNING | ||
- FIXME | ||
- ARCHIVE | ||
- HACK | ||
- CHANGED | ||
- XXX | ||
- IDEA | ||
- NOTE | ||
- REVIEW | ||
- BACKLOG | ||
lists: | ||
- name: NOTE | ||
hidden: false | ||
ignore: false | ||
id: jea6phpllxpsj7m | ||
- name: TODO | ||
hidden: false | ||
ignore: false | ||
id: jea6phpllxpsj7j | ||
- name: DOING | ||
hidden: false | ||
ignore: false | ||
id: jea6phpllxpsj7k | ||
- name: DONE | ||
hidden: false | ||
ignore: false | ||
id: jea6phpllxpsj7l | ||
settings: | ||
openIn: default | ||
customOpenIn: '' | ||
editorTheme: blackboard | ||
journalType: New File | ||
journalPath: tasks | ||
appendNewCardsTo: imdone-tasks.md | ||
newCardSyntax: HASHTAG | ||
replaceSpacesWith: '-' | ||
plugins: | ||
devMode: false | ||
journalTemplate: null | ||
theme: dark | ||
views: [] | ||
name: Import-tasks | ||
cards: | ||
colors: [] | ||
template: | | ||
<!-- created:${(new Date()).toISOString()} task-id:${sid} --> | ||
trackChanges: false | ||
metaNewLine: false | ||
addCompletedMeta: false | ||
addCheckBoxTasks: false | ||
doneList: DONE | ||
taskPrefix: '##' | ||
tagPrefix: + | ||
metaSep: ':' | ||
orderMeta: true | ||
maxLines: 6 | ||
addNewCardsToTop: true | ||
defaultList: TODO |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
const generateRandomString = (length) => { | ||
let result = ''; | ||
const characters = | ||
'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; | ||
const charactersLength = characters.length; | ||
for (let i = 0; i < length; i++) { | ||
result += characters.charAt(Math.floor(Math.random() * charactersLength)); | ||
} | ||
return result; | ||
}; | ||
|
||
module.exports = function (task) { | ||
const project = this.project | ||
return { | ||
sid: generateRandomString(5) | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## #CURRENT After collaborative design, import a story and story tasks from markdown | ||
<!-- #story --> | ||
<!-- created:2023-09-12T13:05:36.035Z task-id:g4ihW order:-10 story-id:Import-tasks --> |
3 changes: 3 additions & 0 deletions
3
backlog/stories/Import-tasks/tasks/.backlog-is-the-default-project-folder.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## #DONE `./backlog` is the default project folder | ||
<!-- #task --> | ||
<!-- created:2023-09-12T13:05:36.053Z task-id:RHwz2 group:"Ungrouped Tasks" story-id:Import-tasks order:10 --> |
3 changes: 3 additions & 0 deletions
3
backlog/stories/Import-tasks/tasks/Import-adds-story-cards-to-current.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## #DONE Import adds story cards to current | ||
<!-- story-id:Import-tasks group:"Ungrouped Tasks" #task --> | ||
<!-- created:2023-09-13T00:59:06.160Z task-id:7fCRq order:-30 --> |
3 changes: 3 additions & 0 deletions
3
backlog/stories/Import-tasks/tasks/Initialize-imdone-in-the-backlog-folder.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## #DONE Initialize imdone in the backlog folder | ||
<!-- #task --> | ||
<!-- created:2023-09-12T13:05:36.055Z task-id:tzubx group:"Ungrouped Tasks" story-id:Import-tasks order:20 --> |
3 changes: 3 additions & 0 deletions
3
backlog/stories/Import-tasks/tasks/Make-sure-checked-items-are-put-in-DONE-list.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## #DONE Make sure checked items are put in DONE list | ||
<!-- #task --> | ||
<!-- created:2023-09-12T13:05:36.064Z task-id:DCM3w group:"Ungrouped Tasks" story-id:Import-tasks order:60 --> |
3 changes: 3 additions & 0 deletions
3
.../Import-tasks/tasks/On-import-always-remove-the-contents-of-the-backlogstory.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## #DONE On import always remove the contents of the `backlog/story/<story-id>` | ||
<!-- #task --> | ||
<!-- created:2023-09-12T13:05:36.059Z task-id:uwCAv group:"Ungrouped Tasks" story-id:Import-tasks order:40 --> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## #DONE Refactor to domain | ||
<!-- #task --> | ||
<!-- created:2023-09-12T13:05:36.072Z task-id:w9AhL group:"Ungrouped Tasks" story-id:Import-tasks order:-20 --> |
3 changes: 3 additions & 0 deletions
3
...tasks/tasks/Save-story-id-project-path-so-it's-available-for-starting-a-task.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## #DONE Save story-id project path so it's available for starting a task | ||
<!-- #task --> | ||
<!-- created:2023-09-12T13:05:36.069Z task-id:eGOkf group:"Ungrouped Tasks" story-id:Import-tasks order:80 --> |
3 changes: 3 additions & 0 deletions
3
...log/stories/Import-tasks/tasks/Shold-handle-a-file-with-the-following-format.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## #DONE Shold handle a file with the following format | ||
<!-- #task --> | ||
<!-- created:2023-09-12T13:05:36.062Z task-id:6lshu group:"Ungrouped Tasks" story-id:Import-tasks order:50 --> |
3 changes: 3 additions & 0 deletions
3
backlog/stories/Import-tasks/tasks/``-should-be-the-markdown-title.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## #DONE `<story-id>` should be the markdown title | ||
<!-- #task --> | ||
<!-- created:2023-09-12T13:05:36.057Z task-id:pSyPB group:"Ungrouped Tasks" story-id:Import-tasks order:30 --> |
3 changes: 3 additions & 0 deletions
3
backlog/stories/Import-tasks/tasks/use-markdown-it.parse-to-create-AST.md
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
## #DONE use `markdown-it.parse` to create AST | ||
<!-- #task --> | ||
<!-- created:2023-09-12T13:05:36.066Z task-id:YU3Ur group:"Ungrouped Tasks" story-id:Import-tasks order:70 --> |
Oops, something went wrong.