sagemath / trac-to-github

Script to migrate Trac tickets to GitHub issues and the Trac wiki to markdown. Input: https://trac.sagemath.org/ ➠ Intermediate: https://github.com/sagemath/trac_to_gh ➠ Output: https://github.com/sagemath/sage/issues
https://trac.sagemath.org/ticket/30363
7 stars 5 forks source link

Remove comment number from Last 10 new commits #152

Closed kwankyu closed 1 year ago

kwankyu commented 1 year ago

Seen many times like in https://34.105.185.241/sagemath/sage-all-2023-01-14-013/issues/16266#issuecomment-4698665

kwankyu commented 1 year ago

It seems that the text is always "Last 10 new commits:", but I was not sure, and hence the regex.

mkoeppe commented 1 year ago

Some comments have the "Last 10 new commits" but also a real human-written comment. Does this patch also remove the comment number from those?

kwankyu commented 1 year ago

Perhaps yes. May I see those comments? I can try to figure out a stricter check.

mkoeppe commented 1 year ago

https://34.105.185.241/sagemath/sage-all-2023-01-14-013/issues/16266#issuecomment-4698668 is one example with human comment at the beginning

kwankyu commented 1 year ago

That is OK since it starts with a human comment. The code checks the "note" (comment) starts with "Last 10 new commits:".

I think it is unlikely that a human comment is added after the commits block. And I think it's OK to have a few false positives (they still have link ids; just the text gone).

mkoeppe commented 1 year ago

OK, thanks!