Skip to content
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

Use markdown language for hub pull-request files #5634

Conversation

EricCrosson
Copy link
Contributor

@EricCrosson EricCrosson commented Jan 22, 2023

Use markdown language for hub pull-request files

The hub1 command-line tool uses a file called PULLREQ_EDITMSG2.
This file is used to edit the text from of each commit being submitted
in a pull request, and the final content is rendered as markdown by
GitHub.

This commit adds PULLREQ_EDITMSG to the list of markdown file-types.

Footnotes

  1. https://github.com/github/hub

  2. https://github.com/github/hub/blob/c8e68d548a39ec0fab6f674a669c21b54d4eec61/commands/pull_request.go#L225

@EricCrosson EricCrosson force-pushed the use-git-commit-language-for-hub-pull-request-files branch from 5ab8e00 to c680f6b Compare January 22, 2023 16:18
@EricCrosson EricCrosson marked this pull request as ready for review January 22, 2023 16:31
@pascalkuthe
Copy link
Member

I admitately haven't used hub much but wouldn't markdown be the appropriate file type? Given that github PRs are written in markdown (the appropriate hub documentation eben refers to markdown)

The hub[^1] command-line tool uses a file called `PULLREQ_EDITMSG`[^2].
This file is used to edit the text from of each commit being submitted
in a pull request, and the final content is rendered as markdown by
GitHub.

This commit adds `PULLREQ_EDITMSG` to the list of markdown file-types.

[^1]: https://github.com/github/hub
[^2]: https://github.com/github/hub/blob/c8e68d548a39ec0fab6f674a669c21b54d4eec61/commands/pull_request.go#L225
@EricCrosson
Copy link
Contributor Author

I like it! We won't enjoy the default rulers that come with git-commit, but I can live without that. I'll make the change, thanks for the suggestion

@EricCrosson EricCrosson changed the title Use git-commit language for hub pull-request files Use markdown language for hub pull-request files Jan 22, 2023
@EricCrosson EricCrosson force-pushed the use-git-commit-language-for-hub-pull-request-files branch from c680f6b to 8691076 Compare January 22, 2023 18:41
@the-mikedavis
Copy link
Member

I think that rulers might not be necessary for PR descriptions anyways, no? I
haven't used hub for writing PR descriptions but the website textboxes do not
accomodate hard wrapping. (For example this comment is hardwrapped at 80 cols.)

Maybe hub fixes this though? It would be possible to add a language entry for
PR descriptions that inherits the markdown parser and queries and sets rulers
the same way that the commit message language configuration does.

@the-mikedavis the-mikedavis added S-waiting-on-review Status: Awaiting review from a maintainer. A-language-support Area: Support for programming/text languages labels Jan 22, 2023
@EricCrosson
Copy link
Contributor Author

I think that rulers might not be necessary for PR descriptions anyways, no?

This is true for the body, but the title has a maximum character count else it will be truncated with an ellipsis and continued in the body, which makes for a poor UX.

Thanks for the suggestion on creating a new language entry! In my cursory search, I actually can't find any docs from GitHub detailing what the maximum PR title length is. I think this is a minor case, I'm more than happy to live without the ruler for now.

I may feel differently if the ruler extended only over the first line of the buffer, but to have a single ruler extend all the way down the screen feels less than intuitive.

@the-mikedavis the-mikedavis merged commit 17acadb into helix-editor:master Jan 23, 2023
@EricCrosson EricCrosson deleted the use-git-commit-language-for-hub-pull-request-files branch January 24, 2023 01:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-language-support Area: Support for programming/text languages S-waiting-on-review Status: Awaiting review from a maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants