Class: Pulley::Github
- Inherits:
-
Object
- Object
- Pulley::Github
- Defined in:
- lib/pulley.rb
Instance Method Summary collapse
-
#initialize(username, password, repo) ⇒ Github
constructor
A new instance of Github.
- #pull_requests ⇒ Object
- #update_pull_request(number, title, body) ⇒ Object
Constructor Details
#initialize(username, password, repo) ⇒ Github
Returns a new instance of Github.
41 42 43 44 45 |
# File 'lib/pulley.rb', line 41 def initialize username, password, repo @repo = repo @connection = Octokit::Client.new(login: username, password: password, auto_traversal: true) end |
Instance Method Details
#pull_requests ⇒ Object
47 48 49 |
# File 'lib/pulley.rb', line 47 def pull_requests @connection.pull_requests(@repo) end |
#update_pull_request(number, title, body) ⇒ Object
51 52 53 |
# File 'lib/pulley.rb', line 51 def update_pull_request number, title, body @connection.update_pull_request(@repo, number, title, body) end |