aboutsummaryrefslogtreecommitdiffstats
path: root/.extras
blob: eff3e3f45e6fafa12c2bd718070047f01c379292 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
NOTES_DIR=$HOME/ghq/github.com/simenandre/notes/
function note() {
  if [ $1 ]; then
    echo $1 >> $NOTES_DIR/$(date +%Y-%m-%d).md 
  fi
}

function nt() {
  if [ $1 ]; then
    CONTENT="- [ ] $1"
    note $CONTENT
  fi
}

function getBjerkIssues() {
  gh issue list --repo bjerkio/internal \
    --search "-label:backlog -label:kind/system" \
    --json title,body,url,createdAt,assignees,number,labels,comments \
    --jq 'map({url, createdAt, title, labels: [.labels[].name], assignees: [.assignees[].login], body, number: "#\(.number)", comments: .comments | map({ body: .body, createdAt: .createdAt })})'
}