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

Sort description items by order #155

Closed kwankyu closed 1 year ago

kwankyu commented 1 year ago

Sort description items in this

order = ['cc:', 'component', 'keywords', 'author', 'reviewer', 'branch', 'commit', 'depends']

Other items, if any, follow in alphabetical order.

kwankyu commented 1 year ago

Of course, you can control the order. I am not sure if "cc:" should be between "keywords" and "author".

mkoeppe commented 1 year ago

I think "Depends" should be the very first item because it has a different format that makes it seems more like part of the text.

The rest of the order looks good to me. In particular, having "Author" precede "Reviewer" is, of course, a great improvement.

mkoeppe commented 1 year ago

Also Author - Branch/Commit - Reviewer would make sense to me; but I don't have a clear preference on that

mkoeppe commented 1 year ago

With some more fields:

order = ['depends', 'upstream', 'cc:', 'component', 'keywords', 'assignee', 'author', 'branch', 'commit', 'reviewer', 'merged']
kwankyu commented 1 year ago

Done.

kwankyu commented 1 year ago

While I am at it:

why names in CC are not separated by commas?

kwankyu commented 1 year ago

I saw branch @ commit format. Is this an official format?

I say that since we may use branch / commit format for Branch/Commit field.

mkoeppe commented 1 year ago

why names in CC are not separated by commas?

Because one wouldn't use commas in a list of at-mentions.

kwankyu commented 1 year ago

OK if that's a convention.

mkoeppe commented 1 year ago

I saw branch @ commit format. Is this an official format?

It's not syntax. It is intended to express that we are sitting on the branch "at" this commit.

kwankyu commented 1 year ago

I think "Depends" should be the very first item because it has a different format that makes it seems more like part of the text.

At the same time, it is separated from the text by 2 spaces, and has least significant information, which is perhaps why it is placed at the last line in trac. We may regard it as a third block among 4 blocks (the last one is "Issue created by ...")

mkoeppe commented 1 year ago

I don't know if it matters, but to me the order ['depends', 'upstream', 'cc:', 'component', 'keywords', 'assignee', 'author', 'branch', 'commit', 'reviewer', 'merged'] makes sense "chronologically".

kwankyu commented 1 year ago

I saw branch @ commit format. Is this an official format?

It's not syntax. It is intended to expresses that we are sitting on the branch "at" this commit.

If it's not an official form in git culture, I doubt if people will get the intention easily (commit @ branch makes more sense to me...) Anyway OK with me.

kwankyu commented 1 year ago

I don't know if it matters, but to me the order ['depends', 'upstream', 'cc:', 'component', 'keywords', 'assignee', 'author', 'branch', 'commit', 'reviewer', 'merged'] makes sense "chronologically".

I have no more argument. I respect your judgment :-)

mkoeppe commented 1 year ago

Thank you!