neithernut / git-dit

Decentralized Issue Tracking for git
Other
457 stars 18 forks source link

Trailers not beeing recognized (when having underscore in key?) #175

Closed matthiasbeyer closed 6 years ago

matthiasbeyer commented 6 years ago

This is a more complicated one.

I created a import of kairos and some issues contain the following example trailers:

Dit-GH-issue:      22
Dit-GH-created_at: 2018-03-22T14:40:42Z
Dit-GH-title:      Iterator iterates endless if only "until <year>" is specified
Dit-GH-pr:         false

Then I opened this issue in my git-dit-wui and I noticed that the trailers are not beeing recognized.

I tried to confirm that by running

git dit get-issue-metadata fdc9f5a6d0f97d1669752ad9a315c98ce4d6a171 --key Dit-GH-number

for example, and I got no output, which I believe confirms my issue.

Reproducing

I was not able to reproduce this with some handtyped trailers. But when pasting the trailers I pasted above, I was able to reproduce.

I'm certain that this is caused by the _ (underscore) in the second trailer.

matthiasbeyer commented 6 years ago

I updated my importer script to not use a underscore in the trailer key and it works now.

neithernut commented 6 years ago

Maybe we should check what characters git interpret-trailers accepts for names and mirror that (more closely).

We should also document the exact characters.

neithernut commented 6 years ago

Judging from the git sources, we pretty much nailed what can go into a trailer key: https://github.com/git/git/blob/0b0cc9f86731f894cff8dd25299a9b38c254569e/trailer.c#L613

matthiasbeyer commented 6 years ago

Okay, I'd say we can close this then.