File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 19
19
}
20
20
21
21
version=" 0.1.0"
22
- date =$( date -u +" %Y-%m-%d" )
22
+ today =$( date +" %Y-%m-%d" )
23
23
repo=" $( gh config get -h github.com user) /todo"
24
24
25
25
get_issue_id () {
26
- echo $( gh issue list --search " $date " --json " number" --jq " .[0].number" --repo $repo )
26
+ gh issue list --search " $today " --json " number" --jq " .[0].number" --repo $repo
27
27
}
28
28
29
29
init () {
@@ -34,9 +34,9 @@ add() {
34
34
input=" $1 "
35
35
issue_id=$( get_issue_id)
36
36
if [[ -z $issue_id ]]; then
37
- exec gh issue create --title $date --body " - [ ] $input " --repo $repo
37
+ exec gh issue create --title $today --body " - [ ] $input " --repo $repo
38
38
else
39
- body=$( gh issue list --search " $date " --json " body" --jq " .[0].body" --repo $repo )
39
+ body=$( gh issue list --search " $today " --json " body" --jq " .[0].body" --repo $repo )
40
40
body=$( echo -e " $body \n- [ ] $input " )
41
41
exec gh issue edit $issue_id --body " $body " --repo $repo
42
42
fi
You can’t perform that action at this time.
0 commit comments