lib/abak-flow/branch.rb in abak-flow-1.0.4 vs lib/abak-flow/branch.rb in abak-flow-1.0.5
- old
+ new
@@ -65,11 +65,11 @@
# TODO : Сделать настраевыемым трекер и формат задачи
def extract_body
return I18n.t("commands.publish.nothing") if
tasks_from_commit_message.empty? && !tracker_task?
- [tasks_from_commit_message, task].flatten
+ [tasks_from_commit_message, task].flatten.uniq
.map { |x| "http://jira.railsc.ru/browse/#{x}" } * "\n"
end
def update
origin = @manager.repository.origin.repo
@@ -120,10 +120,9 @@
private
def tasks_from_commit_message
@parsed_tasks ||=
@branch.gcommit.message
.scan(/(?:#{MAGICK_WORDS * "|"})\s+(#{TASK_FORMAT})/i)
- .reject { |x| x == task.to_s }
end
def parse_branch_name
matches = name.match(/^(?<prefix>.+)\/(?<task>.+)$/)