Class: Git::Lint::Branches::Environments::GitHubAction

Inherits:
Object
  • Object
show all
Defined in:
lib/git/lint/branches/environments/git_hub_action.rb

Overview

Provides GitHub Action build environment feature branch information.

Instance Method Summary collapse

Constructor Details

#initialize(repository: GitPlus::Repository.new) ⇒ GitHubAction

Returns a new instance of GitHubAction.



9
10
11
# File 'lib/git/lint/branches/environments/git_hub_action.rb', line 9

def initialize repository: GitPlus::Repository.new
  @repository = repository
end

Instance Method Details

#commitsObject



17
18
19
# File 'lib/git/lint/branches/environments/git_hub_action.rb', line 17

def commits
  repository.commits "origin/#{repository.branch_default}..#{name}"
end

#nameObject



13
14
15
# File 'lib/git/lint/branches/environments/git_hub_action.rb', line 13

def name
  "origin/#{repository.branch_name}"
end