Module: GithubRunDeck::Git
- Extended by:
- Git
- Included in:
- Git
- Defined in:
- lib/github-rundeck/git.rb
Overview
> This is the Git Module. It interacts with Git resources.
Instance Method Summary
collapse
Instance Method Details
#ghclient ⇒ Object
20
21
22
23
|
# File 'lib/github-rundeck/git.rb', line 20
def ghclient
Github::Client.new
end
|
#repos ⇒ Object
25
26
27
|
# File 'lib/github-rundeck/git.rb', line 25
def repos
ghclient.repos
end
|
#revision ⇒ Object
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
# File 'lib/github-rundeck/git.rb', line 33
def revision
rev = Config.query_params['revision'] || return
return rev unless Config.query_params['gh_repo']
org, repo = Config.query_params['gh_repo'].split('/').map { |r| String(r) }
return rev unless org && repo
begin
ghclient.git_data.trees.get(org, repo, rev).first[1][0, 7]
rescue Github::Error::NotFound
rev
end
end
|
29
30
31
|
# File 'lib/github-rundeck/git.rb', line 29
def tags
ghclient.tags
end
|