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

Using --create-issue result in bad request. #328

Open
mthines opened this issue Jun 27, 2021 · 10 comments · May be fixed by #491
Open

Using --create-issue result in bad request. #328

mthines opened this issue Jun 27, 2021 · 10 comments · May be fixed by #491

Comments

@mthines
Copy link

mthines commented Jun 27, 2021

Hey!

When using the --create-issue, Github is giving an error saying the Your request URL is too long..

image

@bunnybones1
Copy link

Same problem!

@sergeymild
Copy link

The same problem

@vladimirevstratov
Copy link

Same problem

@vladimirevstratov
Copy link

May be use url shortener?

@nabilfreeman
Copy link

Same

@orta
Copy link
Collaborator

orta commented Nov 8, 2022

We should detect if it's too long (~500 chars) and not offer to do the issue

@bombillazo
Copy link

bombillazo commented May 28, 2023

Cant report a problem via CLI due to this :/

@ds300 can I add a check here to avoid sending requests to the Github page URL with more than the permitted length?

if (patchFileContents.endsWith("\n")) {
patchFileContents = patchFileContents.slice(0, -1)
}
open(
`https://github.com/${vcs.org}/${vcs.repo}/issues/new?${stringify({
title: "",
body: `Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used [patch-package](https://github.com/ds300/patch-package) to patch \`${packageDetails.name}@${packageVersion}\` for the project I'm working on.
<!-- 🔺️🔺️🔺️ PLEASE REPLACE THIS BLOCK with a description of your problem, and any other relevant context 🔺️🔺️🔺️ -->
Here is the diff that solved my problem:
\`\`\`diff
${patchFileContents}
\`\`\`
<em>This issue body was [partially generated by patch-package](https://github.com/ds300/patch-package/issues/296).</em>
`,
})}`,
)
}

@ds300
Copy link
Owner

ds300 commented May 28, 2023

Sure!

@bombillazo
Copy link

bombillazo commented May 28, 2023

Awesome, @ds300 ! Here's the PR #469

Feedback is welcome

@bombillazo
Copy link

Hey, had to create a new PR since the old was closed when I merged the latest repo changes to my forked repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
8 participants