using commentlinks html field does not work in PolyGerrit so lets create a plugin that searches and replaces for us :)
(reported upstream by @thcipriani here https://bugs.chromium.org/p/gerrit/issues/detail?id=10455)
using commentlinks html field does not work in PolyGerrit so lets create a plugin that searches and replaces for us :)
(reported upstream by @thcipriani here https://bugs.chromium.org/p/gerrit/issues/detail?id=10455)
I've managed to do this by doing:
var strMessage1 = document.getElementsByClassName("style-scope gr-linked-text"); for(var i=0; i<strMessage1.length; i++) { strMessage1[i].innerHTML = strMessage1[i].innerHTML .replace(/(.+)\s(<a href="https:\/\/gerrit-jenkins\.wmflabs\.org\/[a-zA-Z0-9/_.-]+" target="_blank" rel="noopener" class="style-scope gr-linked-text">)[^<]+<\/a> : ([a-zA-Z_]+)([^<]*)/g, '<li class=\"ci_comment_test\"><span class=\"ci_comment_test_name\">$2$1</a></span> <span class=\"ci_comment_test_result\"><span class=\"ci_result_$3\">$3</span>$4</span></li>'); }
Change 489397 had a related patch set uploaded (by Paladox; owner: Paladox):
[operations/puppet@production] gerrit: Make ci comments pretty under PolyGerrit
Change 489397 abandoned by Paladox:
gerrit: Make ci comments pretty under PolyGerrit
Reason:
Done in https://gerrit.wikimedia.org/r/#/c/operations/software/gerrit/plugins/wikimedia/ /489483/
Change 489483 had a related patch set uploaded (by Paladox; owner: Paladox):
[operations/software/gerrit/plugins/wikimedia@master] Introduce gr-wikimedia-prettify-ci-comments
With the Gerrit 3.2 upgrade, the CI reports are no pretty (T256575). So maybe we can reuse some part from https://gerrit.wikimedia.org/r/c/operations/software/gerrit/plugins/wikimedia/+/489483/14/gr-wikimedia/gr-wikimedia-prettify-ci-comments.html to prettify ;)
Change 489483 abandoned by Hashar:
[operations/software/gerrit/plugins/wikimedia@master] Introduce gr-wikimedia-prettify-ci-comments
Reason: