Sha256: 4c760a7583b20b16f0b11a910372ece3382e28abc312596c84951976359908b7
Contents?: true
Size: 432 Bytes
Versions: 59
Compression:
Stored size: 432 Bytes
Contents
require "danger/ci_source/support/repo_info" module Danger class FindRepoInfoFromURL REGEXP = %r{ (?<slug>[^/]+/[^/]+) (/(pull|merge_requests|pull-requests)/) (?<id>\d+) }x def initialize(url) @url = url end def call matched = url.match(REGEXP) if matched RepoInfo.new(matched[:slug], matched[:id]) end end private attr_reader :url end end
Version data entries
59 entries across 59 versions & 1 rubygems