Sha256: 03be85efa62077dfe4fd161202eeb102213902b4db71c4795e59f9495e4aaa45
Contents?: true
Size: 1.15 KB
Versions: 1
Compression:
Stored size: 1.15 KB
Contents
module Shifter class Change attr_writer :id, :url, :title, :description, :author, :merger, :copied_team_members, :referenced_issues, :merged_at def self.fetch(id) source = Github::PullRequest.get(id) url, title = source.values_at('url', 'title') author = source['user']['login'] merger = source['merged_by']['login'] description = source['body'] merged_at = source['merged_at'] referenced_issues = body.scan(/((\S*)#(\S*))/).map(&:first) copied_team_members = body.scan(/@(\S*)/).map(&:first) new.tap do |c| c.id = id c.url = url c.title = title c.description = description c.author = author c.merger = merger c.merged_at = merged_at c.copied_team_members = copied_team_members c.referenced_issues = referenced_issues end end # options: # - verbose: overrides all to true # - url # - description def to_s(options = {}) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
shifter-0.0.1 | lib/shifter/change.rb |