It would be nice to link back to the issue from the cgit page for a commit.

I couldn't find a discussion or issue that discussed why we are not linking back to the issue from the commit message.

Attached is the example cgit filter adjusted to link to a node.


marvil07’s picture

This sounds like a good idea, here a couple of comments.

  1. s|#([0-9]+)\b|<a href="\1">Issue #\1</a>|g'

    Two notes: let's add a boundary character at the start and do not use the string "Issue " in the link, since commit message could contain already that string(so we do not end up with a "Issue Issue #123" link).

  2. sed -re "$regex"

    I do not really know how cgit expect this, but this seems to execute the regex defined, which is overridden, so we should have one more sed call before overriding the regex variable, right?

joestewart’s picture

1019 bytes

Thanks for looking at it. I quickly attached a file to start discussion. I see the regex wasn't right anyway.

changes attached.

joestewart’s picture

Status: Active » Needs review

1. addressed with starting boundary and Issue.

2. Fellow developer tells me this uses bash concatenation to run both regex lines.

joestewart’s picture

558 bytes

patch attached. Didn't know which repo so it is against the cgit repo at

Mixologic’s picture

Issue tags: +Git Repository Viewer