File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1919}
2020
2121version=" 0.1.0"
22- date =$( date -u +" %Y-%m-%d" )
22+ today =$( date +" %Y-%m-%d" )
2323repo=" $( gh config get -h github.com user) /todo"
2424
2525get_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
2727}
2828
2929init () {
@@ -34,9 +34,9 @@ add() {
3434 input=" $1 "
3535 issue_id=$( get_issue_id)
3636 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
3838 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 )
4040 body=$( echo -e " $body \n- [ ] $input " )
4141 exec gh issue edit $issue_id --body " $body " --repo $repo
4242 fi
You can’t perform that action at this time.
0 commit comments