module GithubRunDeck::Git
> This is the Git
Module. It interacts with Git
resources.¶ ↑
Public Instance Methods
ghclient()
click to toggle source
# File lib/github-rundeck/git.rb, line 20 def ghclient # => Instantiate a new GitHub Client Github::Client.new end
repos()
click to toggle source
# File lib/github-rundeck/git.rb, line 25 def repos ghclient.repos end
revision()
click to toggle source
# File lib/github-rundeck/git.rb, line 33 def revision # rubocop: disable AbcSize # => Grab the Supplied Revision rev = Config.query_params['revision'] || return return rev unless Config.query_params['gh_repo'] # => Break down the Params org, repo = Config.query_params['gh_repo'].split('/').map { |r| String(r) } return rev unless org && repo begin # => Pull the Shorthand SHA ghclient.git_data.trees.get(org, repo, rev).first[1][0, 7] rescue Github::Error::NotFound # => Return the Supplied Revision if Github Borks rev end end