From d88ac1e82719eddfc221666d65f555f6fe75d89c Mon Sep 17 00:00:00 2001 From: Yuya Tanaka Date: Tue, 3 Oct 2017 15:21:15 +0900 Subject: [PATCH] Add --no-fetch option --- bin/git-pr-release | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) mode change 100644 => 100755 bin/git-pr-release diff --git a/bin/git-pr-release b/bin/git-pr-release old mode 100644 new mode 100755 index fd8645f..a56a566 --- a/bin/git-pr-release +++ b/bin/git-pr-release @@ -251,6 +251,9 @@ OptionParser.new do |opts| opts.on('--json', 'Show data of target PRs in JSON format') do |v| @json = v end + opts.on('--no-fetch', 'Do not fetch from remote repo before determining target PRs (CI friendly)') do |v| + @no_fetch = v + end end.parse! ### Set up configuration @@ -264,7 +267,7 @@ say "Staging branch: #{staging_branch}", :debug client = Octokit::Client.new :access_token => obtain_token! -git :remote, 'update', 'origin' +git :remote, 'update', 'origin' unless @no_fetch ### Fetch merged PRs