Sha256: 42eca5601d1ce9d583f8222aa5b7666f69ae001061623b8a4546fd9eef9eabfc
Contents?: true
Size: 1.56 KB
Versions: 4
Compression:
Stored size: 1.56 KB
Contents
#!/usr/bin/env ruby require File.join(File.dirname(__FILE__), '..', 'lib', 'socialcast-git-extensions.rb') require 'readline' include Socialcast run_cmd 'git checkout master' run_cmd 'git pull' run_cmd 'git pull origin last_known_good_next_release' run_cmd 'git push origin HEAD' filter_id = '10102' issues = jira_server.getIssuesFromFilterWithLimit filter_id, 0, 1000 branches = issues.collect do |issue| field = issue.customFieldValues.detect {|k| k.customfieldId == GIT_BRANCH_FIELD } field ? field.values.first : nil end.uniq.compact issues_with_no_branch = issues.reject do |issue| issue.customFieldValues.detect {|k| k.customfieldId == GIT_BRANCH_FIELD } end if issues_with_no_branch.any? puts "\n\nThe following tickets do not have a git branch configured:" issues_with_no_branch.each do |issue| puts "#{issue.key} - #{issue.summary}" end end branches.each do |branch| puts "\n\nChecking state of branch #{branch}:" if branches(:merged => true, :remote => true).include?(branch) puts "All changes in #{branch} have been merged into master" issues_in_branch = associated_tickets(branch) puts "Related tickets on branch #{branch}: #{issues_in_branch.collect(&:key).join(' ')}" issues_in_branch.each do |issue| puts "#{issue.key} - #{issue.summary}" next unless Readline.readline("Mark this issue as released? (y/n)? ") == 'y' release_action = '101' jira_server.progressWorkflowAction issue.key, release_action, [] end else puts "#{branch} has NOT yet been merged into master" end end run_cmd 'git prune-merged -r'
Version data entries
4 entries across 4 versions & 1 rubygems