Class: Popper::Action::Git
- Inherits:
-
Base
- Object
- Base
- Popper::Action::Git
show all
- Defined in:
- lib/popper/action/git.rb
Direct Known Subclasses
Ghe
Class Method Summary
collapse
Methods inherited from Base
action, action?, next_action, next_run, run
Class Method Details
.check_params ⇒ Object
20
21
22
23
|
# File 'lib/popper/action/git.rb', line 20
def self.check_params
@action_config.respond_to?(:repo) &&
@action_config.respond_to?(:token)
end
|
.octkit ⇒ Object
15
16
17
18
|
# File 'lib/popper/action/git.rb', line 15
def self.octkit
Octokit.reset!
Octokit::Client.new(:access_token => @action_config.token)
end
|
.task(mail, params = {}) ⇒ Object
5
6
7
8
9
10
11
12
13
|
# File 'lib/popper/action/git.rb', line 5
def self.task(mail, params={})
url = octkit.create_issue(
@action_config.repo,
mail.subject,
mail.body
)
params["#{self.action}_url".to_sym] = url[:html_url] if url
params
end
|