diff --git a/Gemfile b/Gemfile index 35481f8..46a6fd7 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,4 @@ source 'https://rubygems.org' -gem 'github' +gem 'github_api' gem 'dotenv' diff --git a/Gemfile.lock b/Gemfile.lock index 443885a..5d1b8c9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,30 +1,39 @@ GEM remote: https://rubygems.org/ specs: - addressable (2.2.8) + addressable (2.4.0) + descendants_tracker (0.0.4) + thread_safe (~> 0.3, >= 0.3.1) dotenv (2.1.0) - github (0.7.2) - highline (~> 1.6) - json_pure (~> 1.5.1) - launchy (~> 2.0.2) - text-format (= 1.0.0) - text-hyphen (= 1.0.0) - highline (1.7.8) - json_pure (1.5.5) - spruz (~> 0.2.8) - launchy (2.0.5) - addressable (~> 2.2.6) - spruz (0.2.13) - text-format (1.0.0) - text-hyphen (~> 1.0.0) - text-hyphen (1.0.0) + faraday (0.9.2) + multipart-post (>= 1.2, < 3) + github_api (0.13.1) + addressable (~> 2.4.0) + descendants_tracker (~> 0.0.4) + faraday (~> 0.8, < 0.10) + hashie (>= 3.4) + multi_json (>= 1.7.5, < 2.0) + oauth2 + hashie (3.4.3) + jwt (1.5.1) + multi_json (1.11.2) + multi_xml (0.5.5) + multipart-post (2.0.0) + oauth2 (1.1.0) + faraday (>= 0.8, < 0.10) + jwt (~> 1.0, < 1.5.2) + multi_json (~> 1.3) + multi_xml (~> 0.5) + rack (>= 1.2, < 3) + rack (1.6.4) + thread_safe (0.3.5) PLATFORMS ruby DEPENDENCIES dotenv - github + github_api BUNDLED WITH 1.10.6 diff --git a/main.rb b/main.rb index 9ddd9ba..bc04a97 100644 --- a/main.rb +++ b/main.rb @@ -1,7 +1,23 @@ require 'dotenv' -require 'github' +require 'github_api' Dotenv.load puts "Hello, World." +# $Github = Github.new + +def list_pulls + github = Github.new user: 'peter-murach', repo: 'github' + + github.repos.comments.list do |com| + puts com.body + end + + # # Lists comments on PRs not yet merged in to the Repo, or from external repos + # github.pull_requests.comments.list do |com| + # puts com.body + # end +end + +list_pulls