diff options
author | Teddy Wing | 2018-04-18 23:46:03 +0200 |
---|---|---|
committer | Teddy Wing | 2018-04-18 23:46:03 +0200 |
commit | 83ed5e7c00e2a02e7100e15965b50461eb80f0ce (patch) | |
tree | dfb17aebf9b0a6e3c5ba8cbfdd80dbcdbe8564d8 | |
parent | 383ed25682cbea2444223f08e7e00b08024b4bab (diff) | |
download | redprine-83ed5e7c00e2a02e7100e15965b50461eb80f0ce.tar.bz2 |
Move our main function calls into a `main()` function
-rwxr-xr-x | redprine | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -166,14 +166,13 @@ function update_cache_with_new_pulls () { mv "${CACHE_FILE}.new" "$CACHE_FILE" } +function main () { + local pr_json=$(new_pull_requests) + local issue_prs=$(issue_numbers_and_pull_request_urls "$pr_json") - -# pr_json=$(new_pull_requests) -# issue_prs=$(issue_numbers_and_pull_request_urls "$pr_json") -# -# update_redmine_statuses "$issue_prs" -# update_cache_with_new_pulls "$pr_json" - + update_redmine_statuses "$issue_prs" + update_cache_with_new_pulls "$pr_json" +} function exit_with_error () { @@ -287,3 +286,4 @@ function parse_arguments () { parse_arguments "$@" +main |