GithubHelp home page GithubHelp logo

Comments (9)

silverwind avatar silverwind commented on June 5, 2024 1

On the other hand, existing instances with thousands of issues would not benefit from a fix that is done at commit/comment time, so likely doing it purely at render time is still ideal and arguably easier to implement as well.

from gitea.

KN4CK3R avatar KN4CK3R commented on June 5, 2024

That's currently expected behaviour because the references are not checked because of performance reasons. Same for strings that look like commit hashes.

from gitea.

silverwind avatar silverwind commented on June 5, 2024

What we should do is at time of creation of the commit or creation/edit of a comment containing issue refs, check if the referenced issue exists, and if it does not exist, don't perform the replacement in commit message or comment.

Such a method is possible without any performance impact at rendering time and is also historically accurate so that one can not link to future issues. This is also how GitHub does it.

from gitea.

delvh avatar delvh commented on June 5, 2024

Well… That does have a major drawback though, @silverwind:
If I understand your proposal correctly, it means we have to hardcode HTML into a comment.
I am not a fan of that at all, especially since it irreversibly changes what you entered.

from gitea.

Yakov5776 avatar Yakov5776 commented on June 5, 2024

Same for strings that look like commit hashes.

Nope, commit hashes (short and full) are actually checked. I made sure to confirm this when making the issue.

from gitea.

Yakov5776 avatar Yakov5776 commented on June 5, 2024

Well… That does have a major drawback though, @silverwind: If I understand your proposal correctly, it means we have to hardcode HTML into a comment. I am not a fan of that at all, especially since it irreversibly changes what you entered.

Why HTML? it could just be hardcoding a reference which gets translated into HTML on page render.

from gitea.

silverwind avatar silverwind commented on June 5, 2024

Well… That does have a major drawback though, @silverwind: If I understand your proposal correctly, it means we have to hardcode HTML into a comment. I am not a fan of that at all, especially since it irreversibly changes what you entered.

Indeed, that's a drawback. Also it would require commit messages to be stored in database which I think they are not currently. Still I think doing it at time of commit/comment creation is ideal, just need to find a way how to store whether a ref is valid or not and then retrieve from that store at render time.

from gitea.

KN4CK3R avatar KN4CK3R commented on June 5, 2024

from gitea.

silverwind avatar silverwind commented on June 5, 2024

And it will not highlight references which are not valid at commit time.

I see that as a nice side-effect that one can not link into the future. Either way is fine with me here.

from gitea.

Related Issues (20)

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.