Skip to content
This repository was archived by the owner on Feb 24, 2026. It is now read-only.
This repository was archived by the owner on Feb 24, 2026. It is now read-only.

Prevent break from lack of authentication #5

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.

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

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions