RFR: 202: git-pr create should use a proper Markdown file

Erik Helin ehelin at openjdk.java.net
Mon Dec 16 07:26:43 UTC 2019


On Mon, 16 Dec 2019 07:07:55 GMT, Robin Westberg <rwestberg at openjdk.org> wrote:

>> Hi all,
>> 
>> please review this patch that updates `git pr create` to show a valid Markdown
>> file. The instructions have been moved into HTML comments looking like the
>> following:
>> 
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>>  
>> 
>> I also took the opportunity to tweak the message a bit. Furthermore I added the
>> status for each commit so that it is easy to see changed files and also added a
>> link to an eventual issue. Personally I think the end result turned out quite
>> nice.
>> 
>> Thanks,
>> Erik
>> 
>> ## Testing
>> - [x] Manual testing of `git pr create`
> 
> cli/src/main/java/org/openjdk/skara/cli/GitPr.java line 789:
> 
>> 788:                              .stream()
>> 789:                              .filter(l -> !(l.startsWith("<!--") && l.endsWith("-->")))
>> 790:                              .collect(Collectors.toList());
> 
> Perhaps add a .map(String::strip) before this one to prevent whitespace mistakes?

Yeah, I was thinking about that, but then I realized that _if_ you want to include an HTML comment in your PR text (like this PR does) then the easiest way to do that is to just insert a space at the end of the sentence ��

Not sure how common it will be to include HTML comments though, this is the first time I've done it, but I think I prefer the "simple" semantics that the line strictly has to start and end with ``.

-------------

PR: https://git.openjdk.java.net/skara/pull/329


More information about the skara-dev mailing list