Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub package gets 404 error getting pull request info #32

Open
5 tasks done
mjrodgers opened this issue Jun 13, 2023 · 5 comments
Open
5 tasks done

GitHub package gets 404 error getting pull request info #32

mjrodgers opened this issue Jun 13, 2023 · 5 comments
Labels
bug Something isn't working

Comments

@mjrodgers
Copy link

Thanks in advance for your bug report!

  • Have you reproduced issue in safe mode?
  • Have you used the debugging guide to try to resolve the issue?
  • Have you checked our FAQs to make sure your question isn't answered there?
  • Have you checked to make sure your issue does not already exist?
  • Have you checked you are on the latest release of Pulsar?

What happened?

The GitHub package automatically pulls up info on a "checked out pull request" associated with the currently active repo.

I'm getting 404 errors in the console because the package is attempting to pull this info from the wrong url, namely

  • the pull request is from a repo that I own to the origin (owned by someone else)
  • the github package tries to pull this info from https://api.github.com/repos/<me>/<repo>/pulls/<pull number> and gets a 404
  • this is because the actual pull request info is at https://api.github.com/repos/<origin>/<repo>/pulls/<pull number>
    It seems to somehow resolve the pull request info eventually and will load the relevant info, but very slowly. Also it seems to constantly be trying to pull this info in the background and repeatedly generating these 404 errors.

Pulsar version

1.105.0

Which OS does this happen on?

🍎 macOS

OS details

12.6.6

Which CPU architecture are you running this on?

64-bit(x86_64)

What steps are needed to reproduce this?

  • Load project with a forked GitHub repo, switched to a branch that has an open pull request to the upstream origin.
  • The 404 errors appear in the console.

Additional Information:

No response

@mjrodgers mjrodgers added the bug Something isn't working label Jun 13, 2023
@confused-Techie
Copy link
Member

Thanks a ton for reporting this error, we will have to see what we can find out about this one

@mjrodgers
Copy link
Author

mjrodgers commented Jun 14, 2023

Sure no problem! Seems to be related to this line here, at least in some cases where <this.props.owner>/<this.props.repo> points to the repo originating the PR instead of the target repo (when the PR is from a branch into another from the same repo, I guess it wouldn't result in the 404)

@mjrodgers
Copy link
Author

I'm not sure, but this seems to be fixed in the latest update?

@Daeraxa
Copy link
Member

Daeraxa commented Jun 21, 2023

I think I was the only one to make any changes to this package at all in the last couple of months and it was only to add a menu item. Maybe GitHub's API was being flaky that day?

@mjrodgers
Copy link
Author

It's possible it was just a flaky day, but... the console error definitely had a url it was trying to reach that was incorrect, and modifying the url manually (to replace my github username with the owner of the upstream repo) would pull up the data. On startup after the update, a bunch of my repos asked me to choose a remote to use for pull request data (either origin or upstream), which I had never seen before, and now it works. If no one else ever recreated this issue, I'm happy to write it off as weirdness and mark as closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants