Github: Branch does not pin to pull request

Created on 13 Jun 2017  路  5Comments  路  Source: atom/github

Prerequisites

  • Have you tried to reproduce the problem in Safe Mode?
    Yes, error still occurs
  • Have you followed all applicable steps in the debugging guide?
    Yes, and I have the following versions
    Atom : 1.18.0-beta3
    Electron: 1.3.15
    Chrome : 52.0.2743.82
    Node : 6.5.0

  • Have you checked the FAQs on the message board for common solutions?
    Yes

  • Have you checked that your issue isn't already filed?
    Yes, searched open issues and PR's

Description

When I first opened "Github (preview)" I was given a message that a pull request could not be automatically pinned. Next, I went to get the URL of the pull request, and input that URL manually. This did not work and the panel had a message saying We could not find a pull request at that URL (or something similar from what I can remember). I believe this is the source of the issue.

The pull request I am trying to pin to my branch is on a private repo. I checked to ensure that my current branch matches the branch of the pull request.

This caused me stumble into another error however. After that message I input the SSH address to see if that would work, this actually put me into a screen that says "An unknown error occurred", with "Try Again" below that, and no way to get out of this loop now.

Steps to Reproduce

  1. Download the latest version of Atom Beta
  2. On the welcome screen, click to go to 'git'
  3. On Github panel, login with authentication token
  4. Open project
  5. On github preview, see message about not being able to automatically pin
  6. Try to enter URL of pull request
  7. Could not find a pull request at that URL

Expected behavior:

See an overview of my pull request related to that branch

Actual behavior:

Message that could not find a pull request at that URL

Reproduces how often:

100%

Versions

Running macOS Sierra, Version 10.12.5

Atom : 1.18.0-beta3
Electron: 1.3.15
Chrome : 52.0.2743.82
Node : 6.5.0

Additional Information

The Github integration looks amazing so far!

github under-review

Most helpful comment

Thanks for the report, @djamro2, and sorry for the issues. A couple things.

First, to fix the unrecoverable error you're seeing, you can look in the .git/config file for your repository and delete the atomPrUrl entry for your branch, or run git config --unset branch.BRANCH_NAME.atomPrUrl (replacing BRANCH_NAME with your branch name).

Second, there are a few reasons the package might not be able to find your PR URL. First of all, is the pull request on GitHub.com or on a private Enterprise instance? GitHub Enterprise isn't supported quite yet. Second, if the PR is on a private repo on GitHub.com, does the access token you're using have the ability to access that repository? You can test it out by running the following on the terminal:

curl https://api.github.com/repos/OWNER/REPO/pulls/123 -H "Authorization: token abcdef0123456789"

(replacing abcdef0123456789 with your API token and OWNER/REPO/pulls/123 with the path to your pull request)

If you've forked the repository from an organization, and your access token doesn't have access to that organization's repositories, it may not have access to forks on your own account either, if I recall correctly.

All 5 comments

Thanks for the report, @djamro2, and sorry for the issues. A couple things.

First, to fix the unrecoverable error you're seeing, you can look in the .git/config file for your repository and delete the atomPrUrl entry for your branch, or run git config --unset branch.BRANCH_NAME.atomPrUrl (replacing BRANCH_NAME with your branch name).

Second, there are a few reasons the package might not be able to find your PR URL. First of all, is the pull request on GitHub.com or on a private Enterprise instance? GitHub Enterprise isn't supported quite yet. Second, if the PR is on a private repo on GitHub.com, does the access token you're using have the ability to access that repository? You can test it out by running the following on the terminal:

curl https://api.github.com/repos/OWNER/REPO/pulls/123 -H "Authorization: token abcdef0123456789"

(replacing abcdef0123456789 with your API token and OWNER/REPO/pulls/123 with the path to your pull request)

If you've forked the repository from an organization, and your access token doesn't have access to that organization's repositories, it may not have access to forks on your own account either, if I recall correctly.

Ah that was it. The repo is on GitHub.com, but the access token didn't have access to the organization. I've requested for that now.

@BinaryMuse Just an update, this issue report isn't something that is a bug in code, just something where a better error message might help. Could I contribute on this and make a PR?

I got bit by this as well (private repo, access token missing access), and it took me a while to find this thread. A more helpful error message would be really nice!

We don't support pinning pull requests anymore. Going to close this out. Feel free to reopen if you feel the issue hasn't been sufficiently resolved.

Was this page helpful?
0 / 5 - 0 ratings