From da8c9d4a17cb34953d1b65034f7f78e9f60f41f8 Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 18 Apr 2018 21:41:13 +0200 Subject: Save pull request JSON to a cache file Using `$HOME` as a temporary location for testing. --- redprine | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/redprine b/redprine index e58c26d..1c80a27 100755 --- a/redprine +++ b/redprine @@ -10,6 +10,8 @@ GITHUB_USERNAME='' REDMINE_BASE_URL='' +CACHE_FILE="$HOME/redprine.json" + function github_owner_repo () { local git_remote=$(git remote get-url origin) local owner_repo=$(echo "$git_remote" | @@ -50,7 +52,7 @@ function cache_my_pull_requests () { )' ) - echo $my_pull_requests + echo $my_pull_requests > "$CACHE_FILE" } # branch_heads=$(printf "%s\n" "$pull_requests" | -- cgit v1.2.3