Jump to content

Community Wishlist Survey 2022/Bots and gadgets/A bot or gadget to publish public Git repo to a gadget or user script/Proposal/en

From Meta, a Wikimedia project coordination wiki
  • Problem: It is hard to develop JavaScript scripts and gadgets within MediaWiki. No build tools (especially transpilation), no way to push out changes to many files in one go. Also no review tools (like pull requests).
  • Proposed solution: Provide a publishing tool that would effectively publish a script from e.g. GitHub or GitLab to one of Wikipedia sites. I would assume that the code repository would need to be public (to avoid authentication). On the other hand the tool would publish as the user using it. So the tool would need to have Wikimedia OAuth or use Bot passwords. The publishing tool would be setup using:
  1. Some title of the gadget.
  2. Source and destination URL(s).
  3. Additional info like e.g. default publish message (e.g. providing source URL in the description but also attribution).
  4. Note that I assume the person creating the publisher do not have to be the author of the script.
  5. Once the gadget-publisher is set up, one can publish with one click (optionally adding info to the default publish message to e.g. add version info).
  • Who would benefit: Gadget developers and their users
  • More comments: So at the time of writing Gadgets only support ES5. It is nice that some work on ES2015 is starting, but you know this is kind of all figured out in the frontend world. I think it would all just be easier if wiki developers would use things most other frontend devs use and just quickly publish to Wikipedia. It shouldn't be too hard. The hardest part would probably be making a decent GUI and auth. Other then that you just download one text file and push the text to wiki.
  • Phabricator tickets: (related)
    • phab:T36958: User-level gadget repositories
    • phab:T71445: Implement a sane code-review process for MediaWiki JS/CSS pages on Wikimedia sites.
  • Proposer: Nux (talk) 00:22, 19 January 2022 (UTC)[reply]