Sha256: 657798e11a36698b9f34a5d36c14e2ed56f5a7ac7adbe98899d21b7fbd9eb338

Contents?: true

Size: 489 Bytes

Versions: 10

Compression:

Stored size: 489 Bytes

Contents

module Octospy
  class Parser
    module Wiki
      def parse_gollum_event
        action = @event.payload.pages[0].action
        title = @event.payload.pages[0].title
        sha = @event.payload.pages[0].sha[0,6]
        url = @event.payload.pages[0].html_url
        url = "#{url}/_compare/#{sha}%5E...#{sha}" if action == 'edited'

        {
          status: "#{action} the #{@event.repo.name} wiki",
          title: title,
          link: url
        }
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
octospy-0.1.1 lib/octospy/parser/wiki.rb
octospy-0.1.0 lib/octospy/parser/wiki.rb
octospy-0.0.8 lib/octospy/parser/wiki.rb
octospy-0.0.7 lib/octospy/parser/wiki.rb
octospy-0.0.6 lib/octospy/parser/wiki.rb
octospy-0.0.5 lib/octospy/parser/wiki.rb
octospy-0.0.4 lib/octospy/parser/wiki.rb
octospy-0.0.3 lib/octospy/parser/wiki.rb
octospy-0.0.2 lib/octospy/parser/wiki.rb
octospy-0.0.1 lib/octospy/parser/wiki.rb