Module:Gerrit/doc: Difference between revisions
Add {{lua}}; place all the examples together and using a uniform style. |
m 1 revision imported: Initial Setup |
||
(No difference)
| |||
Latest revision as of 08:47, 12 April 2026
| Uses Lua: |
This is a module for linking to Gerrit, which is the code hosting site we use for MediaWiki and related projects.
A changeset
A changeset is easy - for a specific ID, {{#invoke:Gerrit|link_automatic|55555}} will do the trick. You can also use the Change-Id, e.g. {{#invoke:Gerrit|link_automatic|I789abcdef}}, which will use Gerrit's search function to make the link. These will all show up as interwiki links, using the :gerrit prefix that is defined on MediaWiki.org. If you're exporting this module, be sure to set up that interwiki prefix on your wiki, too.
Search results
If you just link to a string, e.g. {{#invoke:Gerrit|link_automatic|some string}}, the module will URL-encode it and link to the search page. You can also specify more exact constraints to make for more readable module invocations and link texts.
Examples
{{#invoke:Gerrit|link_automatic|55555}}
Gerrit change 55555{{#invoke:Gerrit|link_automatic|Idb7c980bd}}
Gerrit #Idb7c98{{#invoke:Gerrit|link_automatic|owner=MarkTraceur|project=mediawiki/extensions/UploadWizard}}
with owner MarkTraceur and in project mediawiki/extensions/UploadWizard{{#invoke:Gerrit|link_to_paths|repo=mediawiki/core|paths=includes/libs/rdbms,includes/db}}
https://gerrit.wikimedia.org/r/q/project%3Amediawiki%2Fcore+%28path%3A%5Eincludes%2Flibs%2Frdbms%2E%2A+OR+path%3A%5Eincludes%2Fdb%2E%2A%29+is%3Amerged