Skip to content

PR view says a pull request in a private repository doesn't exist #160

Open

Description

@austin-rt

Description:

For a pull request in a private repository, /github <owner>/<repo> pulls <n> and the View Changes button in search results open the PR view with "Pull request # doesn't exist.", even when the user has logged in with /github login. View Changes and View File inside that view fail for private repositories too.

Steps to reproduce:

  1. Run /github login and finish the GitHub sign-in.
  2. Run /github <owner>/<private-repo> pulls <n> for a pull request that exists.

Expected behavior:

The PR view opens with the title, author, state and changed files, and View Changes and View File show their content.

Actual behavior:

The view says "Pull request # doesn't exist."

Rocket.Chat Server Setup Information:

  • Version of Rocket.Chat Server: 8.8
  • Operating System: Linux
  • Deployment Method: docker

Rocket.Chat Client Setup Information

  • Browser Version: Chrome, web client

Additional context

modals/pullDetailsModal.ts fetches api.github.com/repos/{repo}/pulls/{n} and /files without an Authorization header, so GitHub answers 404 for a private repository. modals/fileCodeModal.ts fetches the diff_url and raw_url links without a token as well. Private repository support was added for repo details in #21 (#19) but not for this view. The message comes from #141 (#140).

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions