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

octokit-plugin-create-pull-request force appends "repos" into url #65

Closed
1 of 2 tasks
samusiu opened this issue Jun 7, 2024 · 3 comments
Closed
1 of 2 tasks
Labels
idea an idea for a live show

Comments

@samusiu
Copy link

samusiu commented Jun 7, 2024

Please avoid duplicates

Description

Hi, I'm kind of new to front end and have been trying to use octokit-plugin-create-pull-request to create PRs, however, the request fails because the logic hard codes "repos" into the url when my github url doesn't include it. FYI I'm using an enterprise github so I've replaced the actual owner and repo names with dummies.
For example, for this request,

      .createPullRequest({
        owner: "sam",
        repo: "testrepo",
        title: "test github api",
        body: "test github api",
        head: "test github api PR",
        base: "main"

I get this error

       GET https://github.com/repos/sam/testrepo net::ERR_FAILED

because my actual url would be https://github.com/sam/testrepo
Is it possible to not add that "repos" into the url?

Thank you!

Would you be interested in joining the show?

  • yes
@samusiu samusiu added the idea an idea for a live show label Jun 7, 2024
@gr2m
Copy link
Owner

gr2m commented Jun 10, 2024

it would be better to open an issue on https://github.com/gr2m/octokit-plugin-create-pull-request if you found a bug.

In this case, the /repos part is correct, because this is how the API work. This repo's public URL is https://github.com/gr2m/helpdesk. But the API endpoint is https://api.github.com/repos/gr2m/helpdesk

@gr2m gr2m closed this as completed Jun 10, 2024
@samusiu
Copy link
Author

samusiu commented Jun 14, 2024

ahh yeah I realized that, looks like the request is just failing elsewhere. Sorry for the inconvenience! I'm still getting familiar with the API

@gr2m
Copy link
Owner

gr2m commented Jun 14, 2024

no problem, good luck!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
idea an idea for a live show
Projects
None yet
Development

No branches or pull requests

2 participants