Skip to content

Commit

Permalink
Reduce noise level
Browse files Browse the repository at this point in the history
Removing debug output and unnecessary output.
  • Loading branch information
fleipold committed Apr 22, 2015
1 parent 90492f6 commit f57a333
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
3 changes: 0 additions & 3 deletions bin/jira-format-issues
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,7 @@ class IssueRenderer
filename = attachment['filename']
content_url = find_attachment(attachment, issue)
extension = File.extname(filename)
STDERR.puts("extension: " + extension)
image_marker = [".png", ".jpg"].include?(extension) ? "!": ""

STDERR.puts("marker: " + image_marker)
"* #{image_marker}[#{filename}](#{content_url})"
}.join("\n" * 2)
end
Expand Down
12 changes: 8 additions & 4 deletions lib/jirasync/syncer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,9 @@ def fetch(keys)
end
end
keys_with_errors.sort!
STDERR.puts("Errors fetching these tickets: #{keys_with_errors.join(",")}")
if !keys_with_errors.empty?
STDERR.puts("Errors fetching these tickets: #{keys_with_errors.join(",")}")
end
keys_with_errors
end

Expand All @@ -68,11 +70,13 @@ def update()
state = @repo.load_state()
start_time = DateTime.now
since = DateTime.parse(state['time']).new_offset(0)
STDERR.puts("Fetching issues that have changes since #{since.to_s}")
STDERR.puts("Fetching issues that have been changed/ added since #{since.to_s}")
issues = @client.changed_since(@project_key, since)['issues'].map { |issue| issue['key'] }
STDERR.puts("Updated Issues: #{issues.empty? ? "None" : issues.join(",")}")
STDERR.print("Retrying issues with earlier errors: ")
STDERR.puts(state['errors'].empty? ? "None" : state['errors'].join(","))
if !state['errors'].empty?
STDERR.print("Retrying issues with earlier errors: ")
STDERR.puts( state['errors'].join(","))
end
keys_with_errors = fetch(issues + state['errors'])
@repo.save_state({"time" => start_time, "errors" => keys_with_errors})
end
Expand Down
2 changes: 1 addition & 1 deletion lib/jirasync/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module JiraSync
VERSION = "0.4.4"
VERSION = "0.4.5"
end

0 comments on commit f57a333

Please sign in to comment.