Comments (4)
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?
- Pages in other languages
- Pages that already have a more information link
- Pages with invalid syntax (i.e. invalid syntax that tldr-bot has previously commented on
from tldr-bot.
@tldr-bot should check to make sure that the user executing the command actually permission to do so on that particular PR.
Definitely. Would be very simple to ensure.
- Pages in other languages.
The script applies the appropriate label for the language the page is in. See here
- Pages that already have a more information link
The script overwrites the existing link in the pages that already have one, and adds it to pages that don't.
- Pages with invalid syntax (i.e. invalid syntax that tldr-bot has previously commented on
I'm not sure how the script would react to that. It finds were to insert/modify the line by checking for >
at the beginning; in most cases it would probably be fine. We could also perhaps check if there is a comment (maybe non-hidden?) by @tldr-bot and if there are any commits after it, run the script, otherwise stop.
from tldr-bot.
@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.
from tldr-bot.
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.
from tldr-bot.
Related Issues (7)
- Add reminder when a PR is ready to be merged HOT 7
- Improve readability of error report messages HOT 3
- Add link to this repo in the tldr-bot's user profile HOT 1
- Change icon/profile pic of the tldr-bot HOT 3
- Get tldr-bot marked as a bot account? HOT 1
- Use a package management tool to capture dependencies HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tldr-bot.