I maintain spi-tools.js https://en.wikipedia.org/wiki/User:RoySmith/spi-tools.js. The source is in github. At the moment, my "release process" (if you could call it that) is to edit User:RoySmith/spi-tools.js and copy-paste the new version. This works, but it's clunky. Is there some pre-existing tool for this?
I could build some little tool to to do this, but if something already exists, no need to reinvent the wheel.
Hello Roy-
I don't believe there is any release or deployment process for userJS on the projects, certainly nothing formal or standardized. In some way, Gadgets 2.0/3.0 was designed with these issues in mind, but that project is currently stalled, as far as I know. What you're doing is likely what I and other WMF folks would recommend (version control, tests if feasible, careful deployment with an announcement to users if you have some channel of communication, etc). If you'd ever like a quick security review of the code or possibly some aggregated data on its usage, feel free to create a task in Phabricator.
On Mon, Oct 26, 2020 at 11:27 AM Roy Smith roy@panix.com wrote:
I maintain spi-tools.js https://en.wikipedia.org/wiki/User:RoySmith/spi-tools.js. The source is in github. At the moment, my "release process" (if you could call it that) is to edit User:RoySmith/spi-tools.js and copy-paste the new version. This works, but it's clunky. Is there some pre-existing tool for this?
I could build some little tool to to do this, but if something already exists, no need to reinvent the wheel.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
The Twinkle project uses a Perl script to sync from Github to on-wiki JS: https://github.com/azatoth/twinkle/blob/master/dev/sync.pl
IIRC it's run manually, but one could conceivably run something similar in a CI/CD pipeline. That would, of course, mean storing interface administrator credentials and the tools to use them on third-party servers, which has some security risks. Using something similar to https://wikitech.wikimedia.org/wiki/Help:Toolforge/Auto-update_a_tool_from_GitHub and handling the MW auth and deployment from WMCS servers may reduce some of those risks.
ACN
On Thu, Oct 29, 2020 at 11:09 AM Scott Bassett sbassett@wikimedia.org wrote:
Hello Roy-
I don't believe there is any release or deployment process for userJS on the projects, certainly nothing formal or standardized. In some way, Gadgets 2.0/3.0 was designed with these issues in mind, but that project is currently stalled, as far as I know. What you're doing is likely what I and other WMF folks would recommend (version control, tests if feasible, careful deployment with an announcement to users if you have some channel of communication, etc). If you'd ever like a quick security review of the code or possibly some aggregated data on its usage, feel free to create a task in Phabricator.
On Mon, Oct 26, 2020 at 11:27 AM Roy Smith roy@panix.com wrote:
I maintain spi-tools.js. The source is in github. At the moment, my "release process" (if you could call it that) is to edit User:RoySmith/spi-tools.js and copy-paste the new version. This works, but it's clunky. Is there some pre-existing tool for this?
I could build some little tool to to do this, but if something already exists, no need to reinvent the wheel.
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
-- Scott Bassett sbassett@wikimedia.org _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
On Mon, Oct 26, 2020 at 9:27 AM Roy Smith roy@panix.com wrote:
I maintain spi-tools.js https://en.wikipedia.org/wiki/User:RoySmith/spi-tools.js. The source is in github. At the moment, my "release process" (if you could call it that) is to edit User:RoySmith/spi-tools.js and copy-paste the new version. This works, but it's clunky. Is there some pre-existing tool for this?
There is some discussion in T71445 https://phabricator.wikimedia.org/T71445 and T187749 https://phabricator.wikimedia.org/T187749 but nothing usable. I think some frwiki editors had plans for a bot but I don't know if anything came out of it. The closest tool I'm aware of is Dibabel https://dibabel.toolforge.org/ but that copies the code from another wiki, not Github. (Also, it's meant for Lua code, which does not pose similar security risks.)
Updating the page from a CI script is not too hard but rather scary security-wise. Writing a deploy script in Pywikibot or some similar framework seems pretty straightforward though, reasonably secure, and not too inconvenient to do an extra CLI command for deploying.
Not sure if this is what you're looking for, but https://github.com/femiwiki/remote-gadgets comes to mind.
나의 iPhone에서 보냄
- 21:03, Gergo Tisza gtisza@wikimedia.org 작성:
On Mon, Oct 26, 2020 at 9:27 AM Roy Smith roy@panix.com wrote:
I maintain spi-tools.js. The source is in github. At the moment, my "release process" (if you could call it that) is to edit User:RoySmith/spi-tools.js and copy-paste the new version. This works, but it's clunky. Is there some pre-existing tool for this?
There is some discussion in T71445 and T187749 but nothing usable. I think some frwiki editors had plans for a bot but I don't know if anything came out of it. The closest tool I'm aware of is Dibabel but that copies the code from another wiki, not Github. (Also, it's meant for Lua code, which does not pose similar security risks.)
Updating the page from a CI script is not too hard but rather scary security-wise. Writing a deploy script in Pywikibot or some similar framework seems pretty straightforward though, reasonably secure, and not too inconvenient to do an extra CLI command for deploying. _______________________________________________ Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org