I really wonder whether this is the place for it and whether it's a good idea. I actually tried to add this myself but it needed a bigger learning curve that what I was able to allocate in time so maybe you might share thoughts of whether this is a good idea and if this is the place to implement it.

It's basically to replace all #xxxxxx on commit logs in the git repository viewer to drupal.org/node/xxxx link to easily go to the issues.

I found some discussions over this on the infrastructure issue queue and apparently means forking gitweb, which seems useless as they are thinking to ditch it for something else eventually, so in the meantime, this might be a good place to put in some improvements.

Comments

clemens.tolboom’s picture

I don't understand ... visiting http://drupal.org/node/525726/commits is see all [#xxxx] linked to their issues.

Please give some links as an example.

hanoii’s picture

I am not talking about drupal.org, I was talking about drupalcode.org as explained in the title.

For example: http://drupalcode.org/project/dreditor.git

a.=

clemens.tolboom’s picture

I still needed a few clicks :( to get to ie http://drupalcode.org/project/dreditor.git/commit/a52dbb05fd9d6efcb18a1e...

So you want a link placed with the issue # :)

<div class="page_body">
Issue&nbsp;#1061758&nbsp;by&nbsp;alanburke:&nbsp;Added&nbsp;"Issue"&nbsp;prefix&nbsp;to&nbsp;commit&nbsp;message.<br>
</div>

Are there more pages with this apart from /project/name.git/commit/* ?

hanoii’s picture

On the link I sent you first there are also references to issues in the log. Basically it's on logs and commits, maybe somewhere else as well.

clemens.tolboom’s picture

On http://drupalcode.org/project/dreditor.git the links should be placed within a table and on the commit we have to make the page_body text linked to d.o. right?

Do you have some jquery ready for those pages?

hanoii’s picture

no.. actually when I went to see if I was able to do that I saw that drupalcode.org doesn't have jquery there, so not sure how it can be used anyway.

clemens.tolboom’s picture

That can easily fixed with something like

if (typeof jQuery == 'undefined') {
  var s=document.createElement('script');
  s.setAttribute('src','http://jquery.com/src/jquery-latest.js');
  document.getElementsByTagName('body')[0].appendChild(s);
}

But trying to add

var t = jQuery('.page_body').text();
alert(t);

fails.

Strangely enough my opera console does know jQuery. Commenting the line with appendChild makes that fail too ...

So jQuery is loaded ok for console ops :(

Any idea?

mitchell’s picture

Title: drupalcode.org #xxxx linking to issues » [#issue] conversion is overactive
Priority: Normal » Major

Dreditor also did a replacement on a docs page: https://drupal.org/node/878880#comment-5527512.

Link for interested js coders: http://drupalcode.org/project/dreditor.git/blob/refs/heads/master:/dredi...

It might also be nice in the future to have the comment # replaced too if the url has comment id in the url.

sun’s picture

Title: [#issue] conversion is overactive » drupalcode.org #xxxx linking to issues
Priority: Major » Normal
Status: Active » Closed (won't fix)

@mitchell: You seem to talk about something completely different.

Reverting issue properties.

Also, I'm afraid, but Dreditor is not able to run on drupalcode.org, since it entirely depends on jQuery + Drupal[.behaviors].

Which, I guess, makes this won't fix. :-/

mitchell’s picture

Sorry bout that.