diff options
| -rwxr-xr-x | redprine | 9 | 
1 files changed, 9 insertions, 0 deletions
| @@ -12,6 +12,8 @@ REDMINE_BASE_URL=''  CACHE_FILE="$HOME/redprine.json" +NEW_PRS='' +  function github_owner_repo () {  	local git_remote=$(git remote get-url origin)  	local owner_repo=$(echo "$git_remote" | @@ -183,11 +185,18 @@ function update_redmine_status () {  		--location "${REDMINE_BASE_URL}/issues/${issue_id}.json"  } +function update_cache_with_new_pulls () { +	jq "${NEW_PRS} + ." "$CACHE_FILE" > "${CACHE_FILE}.new" +	mv "${CACHE_FILE}.new" "$CACHE_FILE" +} +  # pull_requests=$(fetch_pull_requests)  # cache_my_pull_requests "$pull_requests"  pr_json=$(new_pull_requests) +NEW_PRS="$pr_json"  issue_prs=$(issue_numbers_and_pull_request_urls "$pr_json")  update_redmine_statuses "$issue_prs" +update_cache_with_new_pulls | 
