np icon indicating copy to clipboard operation
np copied to clipboard

Can't open github release page when release note is too long

Open fisker opened this issue 5 years ago • 13 comments

Description

This is a limitation on github urls, seems about 8195 (including https://github.com)

here

Expected behavior

I think maybe we can copy the body to clipboard and open a url like this

https://github.com/sindresorhus/np/releases/new?body=<!--%20paste%20your%20release%20notes%20here%20-->

Maybe new-github-release-url should also throw an error.

fisker avatar Feb 17 '20 09:02 fisker

Can you submit a bug report to GitHub? They should really support longer URLs than that.

sindresorhus avatar Feb 17 '20 09:02 sindresorhus

I don't think that solves the problem, even if github supports longer urls, the url length can still reach the browser's url length limits. In chrome about 2MB

fisker avatar Feb 17 '20 09:02 fisker

Yes, but you're much less likely to hit the browser URL limit. So it's still worth sending a bug report.

sindresorhus avatar Feb 17 '20 09:02 sindresorhus

OK, I'll let you know when they reply.

fisker avatar Feb 17 '20 09:02 fisker

That means about a million characters. If your release notes are that long, this is the least of your problems 😝

sindresorhus avatar Feb 17 '20 09:02 sindresorhus

Hmm, something similar just happened to me, but instead of opening this 414 Request-URI Too Large error, nothing was opened at all... The release had 110 commits since the previous one, so I wonder if that enough blew the size up.

By the way, of those, almost 100 were commits by Renovate bot, which I redacted from the release notes while doing it manually, since np didn't work. I was expecting to get the generated release and just delete those commits from it.

papb avatar Oct 12 '20 00:10 papb

I think maybe we can copy the body to clipboard and open a url like this

This sounds reasonable

fregante avatar Feb 03 '23 10:02 fregante

This happens all the time for me due to automated dependency updates (by Renovate) and infrequent releases.

It would be great to simply have an option to disable automatic generation of release notes in np, since I only delete them anyway.

sgarner avatar Aug 01 '23 00:08 sgarner

@sgarner I believe you should be able to do that with np --no-release-draft (or by setting "releaseDraft": "false" in your np config)

tommy-mitchell avatar Aug 02 '23 02:08 tommy-mitchell

@tommy-mitchell I still want np create the draft release though, I just don't want it to pre-populate the notes in the body.

Of course, yes, I could create the release manually. But there is still some convenience in having np open the page and pre-populate the tag version.

sgarner avatar Aug 02 '23 02:08 sgarner

I still want np create the draft release though, I just don't want it to pre-populate the notes in the body.

Makes sense. Would you mind opening another issue suggesting that? If you have any ideas in mind for the option name, that’d be helpful too.

tommy-mitchell avatar Aug 02 '23 03:08 tommy-mitchell

Makes sense. Would you mind opening another issue suggesting that? If you have any ideas in mind for the option name, that’d be helpful too.

Sure, here's a new issue #708 and I had a go at a PR for it in #709 too.

sgarner avatar Aug 02 '23 03:08 sgarner