Class: LabClient::Commit
Overview
Instance Attribute Summary
Attributes inherited from Klass
#client
Attributes inherited from LabStruct
#response, #table
Instance Method Summary
collapse
#has?, #keys, #raw
Methods inherited from Klass
#api_methods, #collect_project_id, #collect_release_id, #collect_repository_id, date_time_attrs, #format_time?, #group_name, #help, #initialize, #klass, #quiet?, #success?, #to_json, #update_self, user_attrs, #valid_group_project_levels, #verbose
Methods included from Docs
#demo, #desc, #doc, docs, #example, #group_name, #help, json, #markdown, #navigation, #option, #result, #subtitle, #title
Methods included from CurlHelper
#curl
Methods included from Logger
#logger, logger, logger_setup
Methods inherited from LabStruct
#[], #[]=, #as_json, #client, #initialize, #key?, #keys, #method_missing, #respond_to_missing?, #slice, #success?, #to_h
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
in the class LabClient::LabStruct
Instance Method Details
#cherry_pick(branch_name) ⇒ Object
18
19
20
21
22
23
|
# File 'lib/labclient/commits/commit.rb', line 18
def cherry_pick(branch_name)
project_id = collect_project_id if project_id.nil?
client.commits.cherry_pick(project_id, id, branch_name)
end
|
53
54
55
56
57
58
|
# File 'lib/labclient/commits/commit.rb', line 53
def (query)
project_id = collect_project_id if project_id.nil?
client.commits.(project_id, id, query)
end
|
46
47
48
49
50
51
|
# File 'lib/labclient/commits/commit.rb', line 46
def
project_id = collect_project_id if project_id.nil?
client.commits.(project_id, id)
end
|
#diff ⇒ Object
32
33
34
35
36
37
|
# File 'lib/labclient/commits/commit.rb', line 32
def diff
project_id = collect_project_id if project_id.nil?
client.commits.diff(project_id, id)
end
|
#inspect ⇒ Object
7
8
9
|
# File 'lib/labclient/commits/commit.rb', line 7
def inspect
"#<Commit title: #{title}, sha: #{short_id}>"
end
|
#merge_requests ⇒ Object
39
40
41
42
43
44
|
# File 'lib/labclient/commits/commit.rb', line 39
def merge_requests
project_id = collect_project_id if project_id.nil?
client.commits.merge_requests(project_id, id)
end
|
#project ⇒ Object
60
61
62
63
64
65
|
# File 'lib/labclient/commits/commit.rb', line 60
def project
project_id = collect_project_id if project_id.nil?
client.projects.show(project_id)
end
|
#refs(scope = :all) ⇒ Object
11
12
13
14
15
16
|
# File 'lib/labclient/commits/commit.rb', line 11
def refs(scope = :all)
project_id = collect_project_id if project_id.nil?
client.commits.refs(project_id, id, scope)
end
|
#revert(branch_name) ⇒ Object
25
26
27
28
29
30
|
# File 'lib/labclient/commits/commit.rb', line 25
def revert(branch_name)
project_id = collect_project_id if project_id.nil?
client.commits.revert(project_id, id, branch_name)
end
|
#status(query = {}) ⇒ Object
71
72
73
74
75
76
|
# File 'lib/labclient/commits/commit.rb', line 71
def status(query = {})
project_id = collect_project_id if project_id.nil?
client.commits.status(project_id, id, query)
end
|
#status_update(query = {}) ⇒ Object
78
79
80
81
82
83
|
# File 'lib/labclient/commits/commit.rb', line 78
def status_update(query = {})
project_id = collect_project_id if project_id.nil?
client.commits.status_update(project_id, id, query)
end
|
#web_url ⇒ Object
67
68
69
|
# File 'lib/labclient/commits/commit.rb', line 67
def web_url
"#{project.web_url}/-/commit/#{id}"
end
|