File tree Expand file tree Collapse file tree 5 files changed +60
-0
lines changed Expand file tree Collapse file tree 5 files changed +60
-0
lines changed Original file line number Diff line number Diff line change
1
+ source "http://rubygems.org"
2
+
3
+ gem "octokit" , "~> 2.0"
Original file line number Diff line number Diff line change
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ faraday (0.8.8 )
5
+ multipart-post (~> 1.2.0 )
6
+ multipart-post (1.2.0 )
7
+ octokit (2.1.1 )
8
+ sawyer (~> 0.3.0 )
9
+ sawyer (0.3.0 )
10
+ faraday (~> 0.8 , < 0.10 )
11
+ uri_template (~> 0.5.0 )
12
+ uri_template (0.5.3 )
13
+
14
+ PLATFORMS
15
+ ruby
16
+
17
+ DEPENDENCIES
18
+ octokit (~> 2.0 )
Original file line number Diff line number Diff line change
1
+ require 'octokit'
2
+
3
+ # !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!!
4
+ # Instead, set and test environment variables, like below
5
+ client = Octokit ::Client . new :access_token => ENV [ 'MY_PERSONAL_TOKEN' ]
6
+
7
+ client . commit_comments ( "octocat/Spoon-Knife" , "cbc28e7c8caee26febc8c013b0adfb97a4edd96e" ) . each do |comment |
8
+ username = comment [ :user ] [ :login ]
9
+ post_date = comment [ :created_at ]
10
+ content = comment [ :body ]
11
+
12
+ puts "#{ username } made a comment on #{ post_date } . It says:\n '#{ content } '\n "
13
+ end
Original file line number Diff line number Diff line change
1
+ require 'octokit'
2
+
3
+ # !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!!
4
+ # Instead, set and test environment variables, like below
5
+ client = Octokit ::Client . new :access_token => ENV [ 'MY_PERSONAL_TOKEN' ]
6
+
7
+ client . pull_request_comments ( "octocat/Spoon-Knife" , 1176 ) . each do |comment |
8
+ username = comment [ :user ] [ :login ]
9
+ post_date = comment [ :created_at ]
10
+ content = comment [ :body ]
11
+
12
+ puts "#{ username } made a comment on #{ post_date } . It says:\n '#{ content } '\n "
13
+ end
Original file line number Diff line number Diff line change
1
+ require 'octokit'
2
+
3
+ # !!! DO NOT EVER USE HARD-CODED VALUES IN A REAL APP !!!
4
+ # Instead, set and test environment variables, like below
5
+ client = Octokit ::Client . new :access_token => ENV [ 'MY_PERSONAL_TOKEN' ]
6
+
7
+ client . issue_comments ( "octocat/Spoon-Knife" , 1176 ) . each do |comment |
8
+ username = comment [ :user ] [ :login ]
9
+ post_date = comment [ :created_at ]
10
+ content = comment [ :body ]
11
+
12
+ puts "#{ username } made a comment on #{ post_date } . It says:\n '#{ content } '\n "
13
+ end
You can’t perform that action at this time.
0 commit comments