User:TheresNoTime/Dev notes
A collection of things I always forget but often need.
TIL
editNode
edit- MediaWiki is tested using node 18.
Misc
editI want to..
editRebase a Gerrit changeset
editFrom 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
Pull a wmf.N branch
editShould just be (e.g.) git checkout wmf/1.44.0-wmf.8
but if that doesn't work (maybe error: pathspec 'wmf/1.44.0-wmf.8' did not match any file(s) known to git
), check .git/config
for fetch = +refs/heads/*:refs/remotes/origin/*
Front-end
editI want to..
editGet the full URL to a Title
editUse 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