Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception while using Octokit #937

Closed
parthan-sundararajan opened this issue Sep 19, 2017 · 2 comments
Closed

Exception while using Octokit #937

parthan-sundararajan opened this issue Sep 19, 2017 · 2 comments
Labels
Type: Support Any questions, information, or general needs around the SDK or GitHub APIs

Comments

@parthan-sundararajan
Copy link

While trying the code at https://gist.github.com/arfon/8726472 getting the below exception,

~ ruby github_stats_octokit.rb
/Users/foo/.rvm/gems/ruby-2.2.3@helpkit/gems/octokit-4.7.0/lib/octokit/connection.rb:185:in delete': no implicit conversion of Symbol into String (TypeError) from /Users/foo/.rvm/gems/ruby-2.2.3@helpkit/gems/octokit-4.7.0/lib/octokit/connection.rb:185:in parse_query_and_convenience_headers'
from /Users/foo/.rvm/gems/ruby-2.2.3@helpkit/gems/octokit-4.7.0/lib/octokit/connection.rb:79:in paginate' from /Users/foo/.rvm/gems/ruby-2.2.3@helpkit/gems/octokit-4.7.0/lib/octokit/client/pull_requests.rb:20:in pull_requests'
from github_stats_octokit.rb:32:in block in <main>' from github_stats_octokit.rb:31:in each'
from github_stats_octokit.rb:31:in `

'

Octokit-4.7.0 in Ruby 2.2.3 (via rvm) in Mac OS X 10.12.6

@tarebyte
Copy link
Member

@parthan-sundararajan this is a Gist from 4 years ago so the API's for Octokit have definitely changed. There are many bugs in this script but the one you're running into can be fixed as so:

-   closed = client.pulls(repo[:name], 'closed')
+   closed = client.pulls(repo[:name], state: 'closed')

The method definition is expecting a Hash of options, whereas the Gist is passing in a String.

Hope this helps!

@parthan-sundararajan
Copy link
Author

Thanks. that helped.

@nickfloyd nickfloyd added Type: Support Any questions, information, or general needs around the SDK or GitHub APIs and removed question labels Oct 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Support Any questions, information, or general needs around the SDK or GitHub APIs
Projects
None yet
Development

No branches or pull requests

3 participants