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 annotated git tags in hub release
#2247
Comments
Hi thank you for your suggestion! To clarify: are you talking about annotated git tags, and your proposed flow would be that Would you be open to the idea that hub would instead pre-populate the contents of the text editor with the message from the git tag, but still open the text editor unless you passed some flag such as |
Yes, annotated git tags. As you probably know, Github Releases doesn't generate annotated tags (nor does it gives us options to do so). To use annotated tags, then, I tag manually. At the end of the process, I have to copy/paste the tag title/message, manually open Github Releases and create a new one based on the recently pushed annotated tag. Having the possibility of the Release feature with tag's title/message automatically would help automate this process. There are more people around the web with the same problem.
Yes, absolutely. I totally understand the UX concerns and I agree, it needs to be coherent. In my use case, though, I would only use p.s.: for context, I currently run a |
To programatically create a GitHub Release by reusing the subject & body of an annotated git tag: git for-each-ref --format="%(subject)%0a%0a%(body)" refs/tags/<TAG> | \
hub release create -F- <TAG> This assumes that the tag was already pushed to the remote. You could incorporate this into your release process. I agree that this is unwieldy. I'll keep this issue open as a todo item to explore how hub could better support annotated tags. Thank you for the suggestion! |
hub release
This utilize TAG=${GITHUB_REF##*/} # in case you use it in github action
git tag --list ${TAG} --format='%(contents:subject)%0a%0a%(contents:body)' | hub release create --draft -F- ${TAG} Note that instead of using |
Is it possible to have
hub release create [TAG]
use the same message as the referenced tag? I don't want it to open the editor for me to add a message when I already added a tag.I imagine I can create a sub script to load the tag message and then use
hub release create -m $tag-message
, but is there any chance this feature already exists and I couldn't find it?The text was updated successfully, but these errors were encountered: