Skip to content

Project slug not accepted #8

Description

@jayvdb

I suspect I am supposed to use -o jayvdb -p flake8-putty, but some input validation should prevent /, or just allow the user to use slugs to simplify the cli.

> /usr/bin/githubcap-cli issues-listing -p jayvdb/flake8-putty
2020-01-07 13:05:37,966 [4529] CRITICAL root: Traceback (most recent call last):
  File "/usr/lib/python3.7/site-packages/githubcap/base.py", line 64, in call
    response.raise_for_status()
  File "/home/jayvdb/.local/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://api.github.com/repos/None/jayvdb/flake8-putty/issues?page=1&per_page=100&filter=all&state=all&sort=created&direction=desc&milestone=*&assignee=*

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/bin/githubcap-cli", line 11, in <module>
    load_entry_point('githubcap==0.0.0', 'console_scripts', 'githubcap-cli')()
  File "/usr/lib/python3.7/site-packages/click/core.py", line 764, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/click/core.py", line 717, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python3.7/site-packages/click/core.py", line 1137, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python3.7/site-packages/click/core.py", line 956, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python3.7/site-packages/click/core.py", line 555, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/githubcap/cli.py", line 172, in issues_listing
    _print_result(list(reported_issues), not no_pretty)
  File "/usr/lib/python3.7/site-packages/githubcap/resources/issues.py", line 70, in list_issues
    for item in self._do_listing(base_uri):
  File "/usr/lib/python3.7/site-packages/githubcap/base.py", line 97, in _do_listing
    response, headers = self.get(uri)
  File "/usr/lib/python3.7/site-packages/githubcap/base.py", line 76, in get
    return cls.call(*args, **kwargs, method='GET')
  File "/usr/lib/python3.7/site-packages/githubcap/base.py", line 66, in call
    raise HTTPError(response.json(), response.status_code) from exc
githubcap.exceptions.HTTPError: Not Found

When I do use -o/-p combo, I get no results

> /usr/bin/githubcap-cli -t ... issues-listing -o jayvdb -p flake8-putty
[]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions