Class: Dpu::ScmService::Github

Inherits:
Base
  • Object
show all
Defined in:
lib/dpu/scm_service/github.rb

Constant Summary collapse

REPOSITORY_URI_TEMPLATE =
"https://github.com/%{account_name}/%{repository_name}"
REMOTE_URL_PATTERN =
[
  %r{\Agit://github\.com/(?<account_name>[^/]+)/(?<repository_name>[^/]+(?=\.git)|[^/]+)},
  %r{\Ahttps?://github\.com/(?<account_name>[^/]+)/(?<repository_name>[^/]+(?=\.git)|[^/]+)},
  %r{\Agit@github\.com:(?<account_name>[^/]+)/(?<repository_name>[^/]+(?=\.git)|[^/]+)},
  %r{\Assh://git@github\.com/(?<account_name>[^/]+)/(?<repository_name>[^/]+(?=\.git)|[^/]+)},
].then { |patterns|
  Regexp.union(*patterns)
}
REF_PREFIX =
"blob"
START_AND_END_LINE_NUMBER_FRAGMENT_TEMPLATE =
"L%{start_line_number}-L%{end_line_number}"

Method Summary

Methods inherited from Base

#determine_fragment, #determine_repository_uri, #ref_prefix