From 83ed5e7c00e2a02e7100e15965b50461eb80f0ce Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Wed, 18 Apr 2018 23:46:03 +0200 Subject: Move our main function calls into a `main()` function --- redprine | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/redprine b/redprine index 7fb277d..13e2a85 100755 --- a/redprine +++ b/redprine @@ -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 -- cgit v1.2.3