Jump to content

User:TheresNoTime/Dev notes

From mediawiki.org

A collection of things I always forget but often need.

TIL

[edit]

Node

[edit]
  • MediaWiki is tested using node 18.

Misc

[edit]

I want to..

[edit]

Rebase a Gerrit changeset

[edit]

From the guide:

# First download the current change set
$ git-review -d 424242
# Next make sure you have a fresh copy of the target branch ("main" in this case)
$ git fetch origin main
# Then rebase your change and fix any conflicts that may occur
$ git rebase -i origin/main

Front-end

[edit]

I want to..

[edit]

Get the full URL to a Title

[edit]

Use mw.util.getUrl (docs):

const log_id = 1000;
console.log(
  mw.util.getUrl(
    'Special:Log',  // The page
    {
      logid: log_id  // Array of params
    }
  )
);

returns /w/index.php?title=Special:Log&logid=1000