Skip to content
This repository has been archived by the owner on Feb 5, 2018. It is now read-only.

posting issues fails #123

Open
rahuldave opened this issue Aug 26, 2015 · 2 comments
Open

posting issues fails #123

rahuldave opened this issue Aug 26, 2015 · 2 comments

Comments

@rahuldave
Copy link

teachers_pet open_issue --organization=cs109-students --repository=test3 --students=students.csv --title="AWS Sign Up" --body ../Issues/aws.md --token TOKEN
Loading students:
 -> notsonaivebayes
==================================================
Authenticating to GitHub...
Found organization at: cs109-students

Creating issue in repositories...
/Library/Ruby/Gems/2.0.0/gems/octokit-3.3.1/lib/octokit/response/raise_error.rb:16:in `on_complete': POST https://api.github.com/repos/cs109-students/notsonaivebayes-test3/issues: 422 - Invalid request. (Octokit::UnprocessableEntity)

nil is not a array. // See: https://developer.github.com/v3/issues/#create-an-issue

If i leave out the body i get

/Library/Ruby/Gems/2.0.0/gems/teachers_pet-0.3.5/lib/teachers_pet/actions/open_issue.rb:19:in `initialize': no implicit conversion of nil into String (TypeError)

The other commands are working so I am wondering what i am doing wrong...

@rahuldave
Copy link
Author

figured it out:

option :labels, banner: 'LABEL1,LABEL2', default:[]

fixed by adding an empty default for labels in commands/open_issue.rb.

I dont have time to test right now, so not making a pull request.

(found the info to fix it here: sociomantic-tsunami/git-hub#142)

@szarnyasg
Copy link

This issue still exists. I got the following exception:

/home/szarnyasg/.rvm/gems/ruby-2.2.1/gems/teachers_pet-0.3.5/lib/teachers_pet/actions/open_issue.rb:19:in `initialize': no implicit conversion of nil into String (TypeError)
    from /home/szarnyasg/.rvm/gems/ruby-2.2.1/gems/teachers_pet-0.3.5/lib/teachers_pet/actions/open_issue.rb:19:in `open'
    from /home/szarnyasg/.rvm/gems/ruby-2.2.1/gems/teachers_pet-0.3.5/lib/teachers_pet/actions/open_issue.rb:19:in `load_files'
    from /home/szarnyasg/.rvm/gems/ruby-2.2.1/gems/teachers_pet-0.3.5/lib/teachers_pet/actions/open_issue.rb:52:in `run'
    from /home/szarnyasg/.rvm/gems/ruby-2.2.1/gems/teachers_pet-0.3.5/lib/teachers_pet/commands/open_issue.rb:15:in `open_issue'
    from /home/szarnyasg/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
    from /home/szarnyasg/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
    from /home/szarnyasg/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /home/szarnyasg/.rvm/gems/ruby-2.2.1/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /home/szarnyasg/.rvm/gems/ruby-2.2.1/gems/teachers_pet-0.3.5/bin/teachers_pet:4:in `<top (required)>'
    from /home/szarnyasg/.rvm/gems/ruby-2.2.1/bin/teachers_pet:23:in `load'
    from /home/szarnyasg/.rvm/gems/ruby-2.2.1/bin/teachers_pet:23:in `<main>'
    from /home/szarnyasg/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `eval'
    from /home/szarnyasg/.rvm/gems/ruby-2.2.1/bin/ruby_executable_hooks:15:in `<main>'

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

No branches or pull requests

2 participants