List for cgit developers and users
 help / color / mirror / Atom feed
* Customization of log view
@ 2017-04-30 14:20 simon
  2017-05-01  9:45 ` john
  0 siblings, 1 reply; 2+ messages in thread
From: simon @ 2017-04-30 14:20 UTC (permalink / raw)


Hi everyone,

I couldn't find any information on this, so excuse me if you've heard this
question (or: request?) a gazillion times before.
We've been using cgit for Xfce for many years and we're really happy about
it. Recently we set up hooks to add references to related commits to
bugreports in our bugzilla instance. We also managed to make the bug
references in cgit's commit view hyperlinks to bugzilla, so those two parts
of our toolchain are more connected.

What would be a nice extra is having clickable bug links in the log view,
but I couldn't find any reference that that is currently possible. So first
of all: is it possible to customize the log view so that we can either make
the bug references clickable hyperlinks (appearance-wise similar to the
branch and tag references) directly or e.g. add a new column with the
buglinks?
And if it currently isn't possible, is this a feature/option you would also
be interested in supporting?

Finally I'm grateful about any pointers as to how to get going in that
direction!

Cheers
Simon

PS: Here's an example of the status quo (bug link in commit view, i.e. the
blue box)
https://git.xfce.org/xfce/xfce4-panel/commit?id=3554f9397a638e8188ee950d9e4562c41c60a367
You can also see the comment that was added by our git-hook to bugzilla
when following the buglink.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.zx2c4.com/pipermail/cgit/attachments/20170430/01bbf03d/attachment.html>


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Customization of log view
  2017-04-30 14:20 Customization of log view simon
@ 2017-05-01  9:45 ` john
  0 siblings, 0 replies; 2+ messages in thread
From: john @ 2017-05-01  9:45 UTC (permalink / raw)


Hi Simon,

On Sun, Apr 30, 2017 at 02:20:05PM +0000, Simon Steinbeiss wrote:
> I couldn't find any information on this, so excuse me if you've heard this
> question (or: request?) a gazillion times before.
> We've been using cgit for Xfce for many years and we're really happy about
> it. Recently we set up hooks to add references to related commits to
> bugreports in our bugzilla instance. We also managed to make the bug
> references in cgit's commit view hyperlinks to bugzilla, so those two parts
> of our toolchain are more connected.
> 
> What would be a nice extra is having clickable bug links in the log view,
> but I couldn't find any reference that that is currently possible. So first
> of all: is it possible to customize the log view so that we can either make
> the bug references clickable hyperlinks (appearance-wise similar to the
> branch and tag references) directly or e.g. add a new column with the
> buglinks?
> And if it currently isn't possible, is this a feature/option you would also
> be interested in supporting?
> 
> Finally I'm grateful about any pointers as to how to get going in that
> direction!

There's no functionality like this at the moment.  It looks like you're
putting bug references in the subject, so presumably adding a filter
around the subject in ui-log.c is what you're looking for.

We currently pass the subject through the commit filter for the commit
UI, so I guess that could be reued for the log view.

The problem is that in the log UI the subject is a hyperlink but all
our current filters act on plain text.  I guess you could pull apart
cgit_commit_link() to allow opening the <a> tag as a separate step and
have the caller output the body of that tag, which could be passed
through a filter.  But I haven't thought through all of the edge cases
here - what if the filter wants its own hyperlink, like your bug link?
Would it be better to call the filter with the href as an argument, so
it's up to the filter to output the anchor tag around the subject?


John


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-05-01  9:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-30 14:20 Customization of log view simon
2017-05-01  9:45 ` john

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).