JasonEtco / create-an-issue

A GitHub Action for creating a new issue from a template file.
MIT License
267 stars 83 forks source link

An error occurred while creating the issue. body is too long (maximum is 65536 characters) #123

Closed mikeparker closed 1 year ago

mikeparker commented 2 years ago
An error occurred while creating the issue. This might be caused by a malformed issue title, or a typo in the labels or assignees. Check ./results.md!

Validation Failed: {"resource":"Issue","code":"custom","field":"body","message":"body is too long (maximum is 65536 characters)"}

Can we trim any payload to the max length before submission?

Or even have an option to overflow the content to a reply after the issue is created, even better.

JasonEtco commented 2 years ago

👋 I think that's out of scope for this action - I'm hesitant to add more functionality to what should be a straightforward, reusable action. This feels like a very specific edge-case so I doubt the majority of people would use an option to truncate the body or overflow to a reply.

You could do that yourself with a more complex action, including by using the outputs of this action to create the issue then, after having "overflowed" the content yourself, reply with the remaining characters.

mikeparker commented 2 years ago

I agree this should be a straightforward action that you can use easily without worrying about edge cases, which is why I think the trimming should be done in the action rather than blowing up if the input is too long.

For me, I'm using this for a weekly report which was written by someone else who no longer works here, it has worked for a long time, and now it's breaking so I need to go into the code to trim the input (which has involved looking up how many bytes per character - which format we're using, UTF standards, etc..). I think most people would rather the action 'just work' and create the issue if the input is too long rather than blowing up. People will need to do the length check manually if its not done in the action so i'm sure over time there will be more people writing the exact same code as me outside the action which feels like a waste.