Skip to content

Instantly share code, notes, and snippets.

@shkrt
Last active September 21, 2017 10:18
Show Gist options
  • Save shkrt/832fb618602527ac35ab57969e3e0ede to your computer and use it in GitHub Desktop.
Save shkrt/832fb618602527ac35ab57969e3e0ede to your computer and use it in GitHub Desktop.
def match_host(issue_url)
Container['matchers.git_host'].(issue_url) do |m|
m.success(:github) { |issue_data| Container['services.github_issue_requester'].(issue_data) }
m.success(:gitlab) { |issue_data| Container['services.gitlab_issue_requester'].(issue_data) }
m.failure do
error('invalid url')
INVALID_URL_ERROR
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment