jutzig / github-release-plugin

uses the github release api to upload files
69 stars 24 forks source link

Body is too long #55

Open ymarcon opened 4 months ago

ymarcon commented 4 months ago

I have this error when deploying a release. Note that there is no <description> in the config, so I am not sure what is sent in the body.

[ERROR] Failed to execute goal de.jutzig:github-release-plugin:1.6.0:release (make-release) on project mica-dist: Failed to create release: {"message":"Validation Failed","errors":[{"resource":"Release","code":"custom","field":"body","message":"body is too long (maximum is 125000 characters)"}],"documentation_url":"https://docs.github.com/rest/releases/releases#create-a-release","status":"422"}
ymarcon commented 4 months ago

I have added a short <description> but the release creation still fails.

ymarcon commented 4 months ago

I think is because of https://github.com/jutzig/github-release-plugin/blob/master/src/main/java/de/jutzig/github/release/plugin/UploadMojo.java#L192

The generated release note is always added and in our case it is very long. So I would suggest to either truncate the body content and/or make the release notes generation optional (default is true).

jutzig commented 4 months ago

Thank you for the report and analysis. I wasn't aware of that character limit. Truncating seems like a good idea for this case. I'll look into a fix