Created
November 6, 2015 16:45
-
-
Save smirn0v/cfb3110b8ec14fa2c49c to your computer and use it in GitHub Desktop.
Affected tasks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'set' | |
require_relative 'issue-tracking' | |
files = `git log --name-only --oneline HEAD^..HEAD | tail -n+2`.split("\n") | |
head_hash = `git rev-parse HEAD` | |
tasks_affected=Set.new | |
files.each{|f| | |
affected = `git log --follow --format="%H" --since="3 weeks ago" "#{f}"`.split("\n") | |
affected.each{|sha| | |
unless sha==head_hash then | |
task = `git show -s --format=%B #{sha}`[/(IOSMAIL-\d+):/,1] | |
unless task == nil then | |
tasks_affected.add(task) | |
end | |
end | |
} | |
} | |
if tasks_affected.size > 0 then | |
qa_notification="За последние 3 недели те же файлы, что и в этой задаче менялись в рамках следующих задач:\n" | |
tasks_affected.each {|task| | |
qa_notification+="#{task}: #{IOSMail::IssueTracking.instance.get_summary(task)}\n" | |
} | |
print qa_notification | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment