[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wikitech-l
Subject:    [Wikitech-l] Re: Open question about commit message linter rules and GItLab's merge requests
From:       David Caro <dcaro () wikimedia ! org>
Date:       2023-12-08 14:02:06
Message-ID: CAKMrEMf0rcbeYU7RRJWR+0pyGTOE4JoyCOHK32eyybCtO9F+TQ () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


NOTICE: completely personal opinion

I don't mind it being a bit scrambled on gitlab UI as long as the links
work.
I would not mind either seeing the trailing `\` on the git commits (or any
other markdown).

I would try to avoid complexity though and not implement per-team/repo
setting unless strictly necessary. And probably try to put that effort on
improving the developer experience when using that validation tool
(creating an auto-formatter, or prompting the user for bugs/missing fields,
etc.).

On Wed, Nov 29, 2023 at 11:08 PM Brett Cornwall <bcornwall@wikimedia.org>
wrote:

> I'm quite disappointed in Gitlab for this. I briefly popped in to
> #gitlab to make sure that there was no recourse for this. Sadly, it
> seems that there is not.
>
> On Tue Nov 28, 2023 at 4:46 PM PST, Bryan Davis wrote:
> > [...]
> > In my estimation, the problem comes down to a question of whether we
> > should prioritize reading commit message footer information nicely in
> > GitLab's merge request interface where they are rendered as GitLab
> > flavored markdown data or not. James' team has developed a convention
> > of appending a backslash (\) after footer lines so that they render as
> > individual lines when processed as markdown. This in turn leads to
> > commit-message-validator rejecting some footers, most obviously "Bug:
> > Tnnnn" footers, for having unwanted characters (the trailing " \").
> >
> > Reasonable people can disagree on the "best" solution here, but I
> > think it is likely that as a group we can reach consensus on what the
> > proper behavior of the commit-message-validator tool should be. The
> > most obvious options are:
> > * Change nothing in commit-message-validator and suggest folks live
> > with markdown rendering artifacts in GitLab merge request
> > descriptions.
> > * Change commit-message-validator to allow trailing " \" data for
> > commit message footers in GitLab repos.
> > * Change commit-message-validator to allow users (typically a CI
> > process) to configure allow/disallow of trailing " \" data for commit
> > message footers
>
> IMO Markdown does not belong in a commit message. Markdown in commit
> messages is analogous to HTML in email.
>
> A middleground could be to prefix the Bug: lines with hyphens so Gitlab
> would interpret them as a list. :/
> _______________________________________________
> Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
> To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
> https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

[Attachment #5 (text/html)]

<div dir="ltr"><div>NOTICE: completely personal opinion<br> <br>I don&#39;t mind it \
being a bit scrambled on gitlab UI as long as the links work.<br></div><div>I would \
not mind either seeing the trailing `\` on the git commits (or any other \
markdown).</div><br><div>I would try to avoid complexity though and not implement \
per-team/repo setting unless strictly necessary. And probably try to put that effort \
on improving the developer experience when using that validation tool (creating an \
auto-formatter, or prompting the user for bugs/missing fields, \
etc.).</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On \
Wed, Nov 29, 2023 at 11:08 PM Brett Cornwall &lt;<a \
href="mailto:bcornwall@wikimedia.org">bcornwall@wikimedia.org</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I&#39;m quite \
disappointed in Gitlab for this. I briefly popped in to<br> #gitlab to make sure that \
there was no recourse for this. Sadly, it<br> seems that there is not.<br>
<br>
On Tue Nov 28, 2023 at 4:46 PM PST, Bryan Davis wrote:<br>
&gt; [...]<br>
&gt; In my estimation, the problem comes down to a question of whether we<br>
&gt; should prioritize reading commit message footer information nicely in<br>
&gt; GitLab&#39;s merge request interface where they are rendered as GitLab<br>
&gt; flavored markdown data or not. James&#39; team has developed a convention<br>
&gt; of appending a backslash (\) after footer lines so that they render as<br>
&gt; individual lines when processed as markdown. This in turn leads to<br>
&gt; commit-message-validator rejecting some footers, most obviously &quot;Bug:<br>
&gt; Tnnnn&quot; footers, for having unwanted characters (the trailing &quot; \
\&quot;).<br> &gt;<br>
&gt; Reasonable people can disagree on the &quot;best&quot; solution here, but I<br>
&gt; think it is likely that as a group we can reach consensus on what the<br>
&gt; proper behavior of the commit-message-validator tool should be. The<br>
&gt; most obvious options are:<br>
&gt; * Change nothing in commit-message-validator and suggest folks live<br>
&gt; with markdown rendering artifacts in GitLab merge request<br>
&gt; descriptions.<br>
&gt; * Change commit-message-validator to allow trailing &quot; \&quot; data for<br>
&gt; commit message footers in GitLab repos.<br>
&gt; * Change commit-message-validator to allow users (typically a CI<br>
&gt; process) to configure allow/disallow of trailing &quot; \&quot; data for \
commit<br> &gt; message footers<br>
<br>
IMO Markdown does not belong in a commit message. Markdown in commit<br>
messages is analogous to HTML in email.<br>
<br>
A middleground could be to prefix the Bug: lines with hyphens so Gitlab<br>
would interpret them as a list. :/<br>
_______________________________________________<br>
Wikitech-l mailing list -- <a href="mailto:wikitech-l@lists.wikimedia.org" \
target="_blank">wikitech-l@lists.wikimedia.org</a><br> To unsubscribe send an email \
to <a href="mailto:wikitech-l-leave@lists.wikimedia.org" \
target="_blank">wikitech-l-leave@lists.wikimedia.org</a><br> <a \
href="https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/" \
rel="noreferrer" target="_blank">https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/</a></blockquote></div>




_______________________________________________
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org
To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org
https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic