-
-
Notifications
You must be signed in to change notification settings - Fork 8
proposal: /commands (set-more-info-link in particular) #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
That's a nice idea! Could be convenient. Security must be central to the implementation though. @tldr-bot should check to make sure that the user executing the command actually permission to do so on that particular PR. How does it handle these cases?
|
Definitely. Would be very simple to ensure.
The script applies the appropriate label for the language the page is in. See here
The script overwrites the existing link in the pages that already have one, and adds it to pages that don't.
I'm not sure how the script would react to that. It finds were to insert/modify the line by checking for |
@sbrl keep in mind that we already have a script that does this (tldr-pages/tldr#5654), but the issue with it that I see is that it's somewhat cumbersome to use, and contributors need Python installed, and it would be really inconvenient to have to install Python just to change some links. |
Cool, that sounds sensible - just wanted to check some edge cases there. I can definitely see the appeal of adding this to the tldr-bot. I would suggest a check that if the GitHub actions have failed on the target PR, then it does not attempt to make a change. If the GitHub actions are in progress, it reschedules the check for say 5 minutes time, but that might be complex to program. |
Is this enhancement still valid? I believe everyone runs the script locally. I don't think it would be a good idea to use this script via the bot. Especially since it's all or nothing at the moment. You can't specify "update the link for page common/X" (is also not possible for the other scripts). |
I recently wrote a Python script,
set-more-info-link.py
(tldr-pages/tldr#5654) that takes a page in the formatplatform/page.md
and a link, and adds/updates the link in the page and all translations using a map of the approprate labels.I was thinking just now that it might be nice to be able to, in a PR, comment something like
whereupon the bot (@tldr-bot) ran
set-more-info-link.py
with those arguments, committed the changes to the PR, maybe the message could be likeIf this were approved, I'd be happy to work on it.
The text was updated successfully, but these errors were encountered: