-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
UX: hub pull-request strips Markdown headers #1377
Comments
This is known, but thank you for opening the issue because I feel this is something that I need to fix. The |
@mislav I think changing the default git comment char may resolve this. |
FWIW |
You may prefix |
Another workaround is to use A First Level Header
====================
A Second Level Header
--------------------- |
I've seen some projects switch from
@mislav I'll try to send a PR, if you choose desired behavior. |
@cben I still think we should change the default comment character for these commands. The question, however, is whether we would break certain automations that people have set up using hub? 🤔 |
Speaking only for myself, the scripts that I have using hub don't involve manually editing the PR message, but rely on providing PR message on the command line with |
Could we just strip the last four lines of the |
There is also Maybe it is a good fit to be used as default? |
@anton-rudeshko That's an excellent idea. Instead of comments being stripped, everything below the cutoff line will be stripped. This will allow people to freely write Markdown in pull requests, issues, releases. Any takers? |
BTW, you also can bypass this little nuisance by prefixing your MD headers with one space when you're in the hub PR description editor: -#### Template header
+ #### Template header
_template text_ As such it will not be treated as comment and will make it's way to resulting PR description. |
@mislav OK if I take a stab at this? |
@jonnystoten By all means, please. I'd imagine that the best approach would be implementing the "scissors" mode and have it be the default. |
@mislav what was the solution here? Has it been fixed? |
Thanks for the reminder @redreceipt! I've just opened a PR to fix this. ❤️ |
Looking at the code change here it seems like there's no longer any way to add comment lines to PR templates, is that correct? We were relying on that feature to add notes and suggestions for the PR author in our templates which didn't render in the final description itself — the new scissor syntax doesn't let us do that, because our non-rendering comments are interspersed with visible lines. Would you be open to adding a comment syntax (which doesn't interact accidentally with markdown) or making the scissors mode switchable? |
GitHub issue/PR templates usually use |
I was creating a pull request for Ansible by running
hub pull-request
. It downloaded Ansible's PULL_REQUEST_TEMPLATE.md very felpfully and spawned Vim for me. I edited the PR description, which looked something likeand then I quit vim and looked at the PR that
hub
created for me.I discovered that
hub
had stripped off all the Markdown headers, resulting in a nonsensical-lookingThis is rather unfriendly to projects that use the
#
header syntax in their.github/PULL_REQUEST_TEMPLATE.md
.(I was using
hub
version 2.3.0-pre4.)The text was updated successfully, but these errors were encountered: