Class: Changelogger::RepoInfo
- Inherits:
-
Struct
- Object
- Struct
- Changelogger::RepoInfo
- Defined in:
- lib/changelogger/repo_info.rb
Overview
Changelogger::RepoInfo holds metadata about the current repository.
Instance Attribute Summary collapse
-
#branch ⇒ String
HEAD branch or “(detached)”.
-
#dirty ⇒ Boolean
True if there are uncommitted changes.
-
#head_short ⇒ String
Abbreviated HEAD sha.
-
#name ⇒ String
Repo name (directory name).
-
#path ⇒ String
Absolute repo root path.
-
#remote ⇒ String
Remote.origin.url (may be empty).
-
#remote_slug ⇒ String?
“owner/repo” for GitHub remotes, otherwise nil.
Instance Attribute Details
#branch ⇒ String
Returns HEAD branch or “(detached)”.
20 |
# File 'lib/changelogger/repo_info.rb', line 20 RepoInfo = Struct.new(:name, :path, :branch, :head_short, :remote, :remote_slug, :dirty, keyword_init: true) |
#dirty ⇒ Boolean
Returns true if there are uncommitted changes.
20 |
# File 'lib/changelogger/repo_info.rb', line 20 RepoInfo = Struct.new(:name, :path, :branch, :head_short, :remote, :remote_slug, :dirty, keyword_init: true) |
#head_short ⇒ String
Returns abbreviated HEAD sha.
20 |
# File 'lib/changelogger/repo_info.rb', line 20 RepoInfo = Struct.new(:name, :path, :branch, :head_short, :remote, :remote_slug, :dirty, keyword_init: true) |
#name ⇒ String
Returns repo name (directory name).
20 |
# File 'lib/changelogger/repo_info.rb', line 20 RepoInfo = Struct.new(:name, :path, :branch, :head_short, :remote, :remote_slug, :dirty, keyword_init: true) |
#path ⇒ String
Returns absolute repo root path.
20 |
# File 'lib/changelogger/repo_info.rb', line 20 RepoInfo = Struct.new(:name, :path, :branch, :head_short, :remote, :remote_slug, :dirty, keyword_init: true) |
#remote ⇒ String
Returns remote.origin.url (may be empty).
20 |
# File 'lib/changelogger/repo_info.rb', line 20 RepoInfo = Struct.new(:name, :path, :branch, :head_short, :remote, :remote_slug, :dirty, keyword_init: true) |
#remote_slug ⇒ String?
Returns “owner/repo” for GitHub remotes, otherwise nil.
20 |
# File 'lib/changelogger/repo_info.rb', line 20 RepoInfo = Struct.new(:name, :path, :branch, :head_short, :remote, :remote_slug, :dirty, keyword_init: true) |