Skip to content

Prevent break from lack of authentication #5

@devdrops

Description

@devdrops

At this moment, this tool can be used for pull requests on both private and public repositories.

  • For public ones: diffcs <source>/<project> <pull request id>
  • For privates: diffcs <source>/<project> <pull request id> --github-user=<your github user>

But if you forget to add the --github-user=<your github user> flag for private repos, this results in an error with the following output:

proof

This error happens due that the knplabs/github-api library throws an exception when the authentication is required and missing in the access request.


The idea is to prevent that error: once the given <project> is detected as private, and the --github-user=<your github user> is not provided in the request, to display a message to the user, to inform that the flag is missing and it's required.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions