Comments (9)
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.
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.
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.
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.
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.
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.
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.
from gitea.
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)
- Disable Action unit by default when mirroring a repo? HOT 8
- ignore invalid workflow "files-changed.yml": unknown on type HOT 1
- parseRemoteUpdateOutput: unexpected update line " * [new ref] refs/pull/30346/head -> refs/pull/30346/head" HOT 3
- Code is not in middle of line in code preview
- Some places seems still using `master` as default branch, is it correct?
- How to limit the size of repository? HOT 4
- Some CSV files cannot be rendered HOT 12
- Conflicting Information In The Docs
- Actions - Inconsistency accessing user's variables and secrets HOT 6
- Unable to remove 'WIP' from PR title HOT 2
- Some existing and all new PRs for a given repository are broken HOT 11
- "Manage Email Addresses " buttons are mispositioned
- evaluate comrak as Markdown parser, renderer HOT 4
- Option to change commit author for push mirrors HOT 2
- HTTP 500 when displaying runner management HOT 1
- 500 internal server error after logging in when 2fa should appear. HOT 2
- [DOM] Found 3 elements with non-unique id #repo_name
- No padding between buttons and above line in Project view UI. HOT 3
- Actions: Support continue-on-error HOT 3
- New Version Release Banner/Info HOT 6
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 gitea.