Giter Site home page Giter Site logo

Comments (4)

sbrl avatar sbrl commented on May 23, 2024

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.

bl-ue avatar bl-ue commented on May 23, 2024

@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.

bl-ue avatar bl-ue commented on May 23, 2024

@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.

sbrl avatar sbrl commented on May 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.