-
Notifications
You must be signed in to change notification settings - Fork 365
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
support github release :body #155
Comments
👍 I can work on this in the next few days |
Awesome. Thanks :) |
I'm not sure this is a good option anymore. Most of the time, we upload to a existing release which already has a body, so we can't set it. However, if the creator uses a light git tag, it doesn't show up as a github release, so we create a new release. In this situation, we could potentially set the body. I think that it would be really confusing for the user to have the body option that they specify not applied in some cases but occasionally in others. Secondly, you can easily edit the body yourself in the github ui. |
Oh I see. My use case was continuous deployment. I don't really want to host downloadables with git releases. I just want some place to keep release notes. However, I can do it differently, not necessarily via Github releases. Feel free to skip this ticket. Thanks for looking into it. |
I, likewise, would love to have the ability to set the body. I have the body content on disk, but have no way to tell dpl to use it. |
Travis allows to pass body to Octokit. The only problem is to figure out how to quote it for command line - see #657. |
@abitrolly I am having exactly the same issue, did you find a solution? For me this worked:
but I can't manage to expand a variable containing a proper changelog |
@valeriomazzeo no solution. But perhaps the problem is in properly escaping newlines in expanded var. |
@abitrolly I made some progress with this and managed to get a successful upload:
Although, when running from travis, markdown doesn't show up correctly, I am trying trimming the double quotes now:
but if |
While @valeriomazzeo's case appears to show that simple spaces may not be much of a problem, as the value specified for Escaping the Perhaps we can have a separate option that reads the body parameter from a different source (e.g., a file). |
Trimming the double quotes works too, but the markdown doesn't show properly. Using Octokit.rb directly, works as expected:
Using travis: If I edit the release, the markdown shows up escaped. Note: screenshot and client command are not the same text I am running out of ideas here... is there a way to test |
I wrote a simple script to simulate bash / ruby interaction:
executing the following produces the correct result:
Any other variant doesn't work as expected:
shows only the characters up to the first space I see that the value is not wrapped in quotes, but I don't see how my script is any different than
|
@valeriomazzeo #155 (comment) the text shown indicates that |
@BanzaiMan if you see my last comment:
Perhaps there is something wrong going on between Update: so... the error message comes from here: Line 17 in 424c7a6
It turns out quotes are perfectly fine and it's all good, but we have been confused by the error message which is definitely a red herring. The real problem is that regular expression that doesn't allow options to contains certain characters, in particular I believe the only problems are new lines. |
I had enough, just made my own: https://gist.github.com/valeriomazzeo/5491aee76f758f7352e2e6611ce87ec1 |
This is supported since #189. However there is an issue with how it handles new-line characters (appear as '\n' rather than the literal new line.) and possibly markdown is escaped (have not verified).
I suppose you have more aggregate statistics than me, but none of my projects or those contributed configuration behave this way. Maybe I am doing things wrong?
Agreed, could the description be over-written? I expect so, so then by default don't over-write but add a config option that enables overwrite?
If I accept this as true, then I can "easily" manually execute build scripts and upload releases to GitHub 😉 . I agree not all use-cases will lend themselves to specifying the body via Travis, but those that do probably have reasons and benefits for doing so. For example, the one I am working on now puts the filesize and sha265 hash in the release body which is information that is required by the ecosystem that will be utilizing the released files. EDIT: Of course, disconcertingly, I seem to be finding the hash calculated by travis is different than the one when I download from GH Releases... |
Hey there, I see a lot of discussion in here, but as @Midnighter commented in travis-ci/travis-ci#8568 (comment), I'm not sure if a solution was mentioned. Essentially, what I'm trying to achieve is, whenever a tag gets built on Travis, extract the corresponding changelog entry from In an ideal world, I would do something like the following, is this any possible? before_deploy:
- "export CHANGELOG_NAME=`cat CHANGELOG.md | ./extract_relevant_changelog_entry_name`"
- "export CHANGELOG_BODY=`cat CHANGELOG.md | ./extract_relevant_changelog_entry_body`"
deploy:
provider: releases
skip_cleanup: true
api_key: ...
name: ${CHANGELOG_NAME}
body: ${CHANGELOG_BODY}
on:
tags: true Oh, question while I'm here: could you confirm that uploading a file is not necessary? I.e. in the example above, I really just need to set name/body, but not upload any file. |
I tried a number of different ways but I think the solution @valeriomazzeo brought forward is the only workable one. No matter how you enter the content it always gets garbled by the deploy script. |
This is not properly supported. See travis-ci/dpl#155
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues |
Before this issue disappears from the face of the earth. Are there any plans to change the GitHub releases deployment or not? |
I would also love to see a solution here. I would like to make my release notes the commit message for the final release commit, which would be very easy to generate, along with a bit of boilerplate on the bottom....this is, of course, impossible right now. |
If this helps anyone, here's a simple bash script I am using to create automated releases: https://gist.github.com/Jaskaranbir/d5b065173b3a6f164e47a542472168c1 It uses github-changelog-generator to generate changelogs (changelogs are written to |
Please add this, sounds a like a low hanging fruit 🥝 :-) |
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues |
comment to disable stalebot |
This sort of works: deploy:
provider: releases
body: |
Title!
more stuff
on:
all_branches: true
edge:
branch: "releases-body-escape"
⋮ # rest The problem I see here is that the implementation at the moment relies on https://rubygems.org/gems/string_undump for |
Does this allow for markdown or only the separation of title and the rest of the body? |
Maybe. Not all markups have been tested. |
For me, even simply placing a
I do realize this may be simply due to special characters in the string, but in reality, that issue should probably be somehow avoided. |
we used the script by @Jaskaranbir with a slight enhancement to curl the last release to generate the changelog from. it needs a GITHUB_OAUTH_TOKEN set with repo write access. |
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues |
I looked at the scripts here that would help with this problem but did also need file upload. https://github.com/lindell/github-release-cli
before_deploy:
- curl https://github.com/lindell/github-release-cli/releases/download/1.1.0/github-releaser-travis -L --output github-releaser && chmod +x github-releaser
- export BODY=$(envsubst < ./CHANGELOG.md)
- export FILES=release-files/*
deploy:
provider: script
script: ./github-releaser -draft -verbose
skip_cleanup: true
on:
tags: true |
adding linuxbrew-wrapper for travis-ci/dpl#155 (comment)
I have added what I believe would be a potential solution to the issues discussed here in this PR: #1069 This renames It would be cool if some of you could give this a shot, or leave your thoughts on the PR. I will close this issue here for the time being, but please feel free to re-open it if needed. |
rename --body to --release_notes, add --release_notes_file (see #155)
I would like to reopen this so the problem in dpl v1 will be fixed but I do not have the necessary permission. @svenfuchs fix is in dpl v2 which has what is for me a showstopper bug, see #1213, so I have to use v1. |
Hey guys,
Thanks for awesome tooling! Please consider adding support for :body when creating release in github.
http://rdoc.info/gems/octokit/Octokit/Client/Releases#create_release-instance_method
https://github.com/travis-ci/dpl/blob/master/lib/dpl/provider/releases.rb#L74
Cheers :)
The text was updated successfully, but these errors were encountered: