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

Fix example call to Octokit.label #1011

Merged
merged 1 commit into from
May 4, 2018
Merged

Conversation

garethrees
Copy link
Contributor

Before:

Octokit.labels("octokit/octokit.rb", "V3 Addition")
Traceback (most recent call last):
        7: from /usr/local/bin/irb:11:in `<main>'
        6: from (irb):6
        5: from /usr/local/lib/ruby/gems/2.5.0/gems/octokit-4.8.0/lib/octokit.rb:46:in `method_missing'
        4: from /usr/local/lib/ruby/gems/2.5.0/gems/octokit-4.8.0/lib/octokit/client/labels.rb:19:in `labels'
        3: from /usr/local/lib/ruby/gems/2.5.0/gems/octokit-4.8.0/lib/octokit/connection.rb:79:in `paginate'
        2: from /usr/local/lib/ruby/gems/2.5.0/gems/octokit-4.8.0/lib/octokit/connection.rb:185:in `parse_query_and_convenience_headers'
        1: from /usr/local/lib/ruby/gems/2.5.0/gems/octokit-4.8.0/lib/octokit/connection.rb:185:in `delete'
TypeError (no implicit conversion of Symbol into String)

After:

Octokit.label("octokit/octokit.rb", "V3 Addition")
=> {:id=>111852, :url=>"https://api.github.com/repos/octokit/octokit.rb/labels/v3%20addition", :name=>"v3 addition", :color=>"ededed", :default=>false}

Before:

    Octokit.labels("octokit/octokit.rb", "V3 Addition")
    Traceback (most recent call last):
            7: from /usr/local/bin/irb:11:in `<main>'
            6: from (irb):6
            5: from /usr/local/lib/ruby/gems/2.5.0/gems/octokit-4.8.0/lib/octokit.rb:46:in `method_missing'
            4: from /usr/local/lib/ruby/gems/2.5.0/gems/octokit-4.8.0/lib/octokit/client/labels.rb:19:in `labels'
            3: from /usr/local/lib/ruby/gems/2.5.0/gems/octokit-4.8.0/lib/octokit/connection.rb:79:in `paginate'
            2: from /usr/local/lib/ruby/gems/2.5.0/gems/octokit-4.8.0/lib/octokit/connection.rb:185:in `parse_query_and_convenience_headers'
            1: from /usr/local/lib/ruby/gems/2.5.0/gems/octokit-4.8.0/lib/octokit/connection.rb:185:in `delete'
    TypeError (no implicit conversion of Symbol into String)

After:

    Octokit.label("octokit/octokit.rb", "V3 Addition")
    => {:id=>111852, :url=>"https://api.github.com/repos/octokit/octokit.rb/labels/v3%20addition", :name=>"v3 addition", :color=>"ededed", :default=>false}
@tarebyte tarebyte merged commit 925bd7d into octokit:master May 4, 2018
@tarebyte
Copy link
Member

tarebyte commented May 4, 2018

Thanks ✨

@tarebyte
Copy link
Member

tarebyte commented May 8, 2018

This has been released as part of https://github.com/octokit/octokit.rb/releases/tag/v4.9.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants