lib/octospy/parser/repository.rb in octospy-0.0.3 vs lib/octospy/parser/repository.rb in octospy-0.0.4

- old
+ new

@@ -13,20 +13,20 @@ def parse_push_event body = [] @event.payload.commits.each do |commit| verbose_commit = Octokit.commit(@event.repo.name, commit.sha) name = "#{verbose_commit.author ? verbose_commit.author.login : commit.author.name}" - link = "#{Octokit.web_endpoint}/#{@event.repo.name}/commit/#{commit.sha}" + link = "#{Octokit.web_endpoint}#{@event.repo.name}/commit/#{commit.sha}" line = "#{name.colorize_for_irc.silver}: #{commit.message}" line << " - #{link.shorten.colorize_for_irc.blue}" body = body + "#{line}".split_lfbl end { status: "pushed to #{@event.payload.ref.gsub('refs/heads/', '')}", body: body, - link: "#{Octokit.web_endpoint}/#{@event.repo.name}", + link: "#{Octokit.web_endpoint}#{@event.repo.name}", notice_body: true } end def parse_create_event @@ -34,26 +34,26 @@ title = @event.repo.name title = "#{title}: #{@event.payload.description}" if @event.payload.description { status: "created repository", title: title, - link: "#{Octokit.web_endpoint}/#{@event.repo.name}", + link: "#{Octokit.web_endpoint}#{@event.repo.name}", repository: nil } else { status: "created #{@event.payload.ref_type}:#{@event.payload.ref}", title: @event.payload.description, - link: "#{Octokit.web_endpoint}/#{@event.repo.name}" + link: "#{Octokit.web_endpoint}#{@event.repo.name}" } end end def parse_delete_event { status: "deleted #{@event.payload.ref_type}:#{@event.payload.ref}", - link: "#{Octokit.web_endpoint}/#{@event.repo.name}" + link: "#{Octokit.web_endpoint}#{@event.repo.name}" } end def parse_fork_event forkee_name = @event.payload.forkee.full_name @@ -66,10 +66,10 @@ end def parse_public_event { status: "published #{@event.repo.name}", - link: "#{Octokit.web_endpoint}/#{@event.repo.name}" + link: "#{Octokit.web_endpoint}#{@event.repo.name}" } end def parse_fork_apply_event {}