aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-04-18 21:41:13 +0200
committerTeddy Wing2018-04-18 21:41:13 +0200
commitda8c9d4a17cb34953d1b65034f7f78e9f60f41f8 (patch)
treeb5f97b1bf267a1e8a7bba189e535d6162dd4cad2
parent2e320bcfb2c02f06cb3470cb8c19c37572cf6cdf (diff)
downloadredprine-da8c9d4a17cb34953d1b65034f7f78e9f60f41f8.tar.bz2
Save pull request JSON to a cache file
Using `$HOME` as a temporary location for testing.
-rwxr-xr-xredprine4
1 files changed, 3 insertions, 1 deletions
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" |