Module: Git Deprecated
- Defined in:
- lib/spm_version_updates/git.rb
Overview
Deprecated.
Use GitOperations from the spm_version_updates core gem instead. This shim exists only for backward compatibility with Dangerfiles written against v0.2.0.
Legacy git helper used by the Danger plugin API. Delegates to GitOperations, so lookups gain its retry behavior and raise GitOperations::LsRemoteError instead of masking failures as empty results.
Constant Summary collapse
- ALLOWED_PROTOCOLS =
GitOperations::ALLOWED_PROTOCOLS
Class Method Summary collapse
-
.branch_last_commit(repo_url, branch_name) ⇒ String?
Call git to find the last commit on a branch.
-
.repo_name(repo_url) ⇒ String
Extract a readable name for the repo given the url, generally org/repo.
-
.trim_repo_url(repo_url) ⇒ String
Removes protocol and trailing .git from a repo URL.
-
.version_tags(repo_url) ⇒ Array<SpmVersionUpdates::Semver>
Call git to list tags.
Class Method Details
.branch_last_commit(repo_url, branch_name) ⇒ String?
Call git to find the last commit on a branch
45 46 47 |
# File 'lib/spm_version_updates/git.rb', line 45 def self.branch_last_commit(repo_url, branch_name) GitOperations.branch_last_commit(repo_url, branch_name) end |
.repo_name(repo_url) ⇒ String
Extract a readable name for the repo given the url, generally org/repo
25 26 27 |
# File 'lib/spm_version_updates/git.rb', line 25 def self.repo_name(repo_url) GitOperations.repo_name(repo_url) end |
.trim_repo_url(repo_url) ⇒ String
Removes protocol and trailing .git from a repo URL
19 20 21 |
# File 'lib/spm_version_updates/git.rb', line 19 def self.trim_repo_url(repo_url) GitOperations.trim_repo_url(repo_url) end |
.version_tags(repo_url) ⇒ Array<SpmVersionUpdates::Semver>
Call git to list tags
34 35 36 |
# File 'lib/spm_version_updates/git.rb', line 34 def self.(repo_url) GitOperations.(repo_url) end |