Linking to an issue without creating a reference #23123
-
Is there a way to include a link in a commit message or PR that doesn’t create a reference on the target repository? Say I’m developing a project at bstinsonmhk/foo and I rely on a library anotheruser/bar, Can I link to anotheruser/bar/issues/1234 without it showing up in their comment stream? They may not care that I’m referencing their issue for my own administrative purposes. |
Beta Was this translation helpful? Give feedback.
Replies: 11 comments 9 replies
-
No, there isn’t a way to prevent that cross-linking from occurring. On the flip side, that cross-link event is only visible to the people that have access to the repository from which the link originated. So if you link to a public repository from a private repository of your own, the only people that will be able to see the link event is yourself and whomever you grant access to your private repository. I hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Linking without references would be a useful feature. I currently resort to just naming PRs by number without linking anymore (which is stupid). I don’t want to cause a reference upstream when just prototyping something and I mention the related upstream issue. On projects I maintain we also get stupid references like this in the discussion stream which just makes it harder to follow what’s important. It has gotten to a point where I often ignore references, simply because > 90% of them are accidental. I think cross-repo links also shouldn’t produce a reference in discussion stream by default. |
Beta Was this translation helpful? Give feedback.
-
I am recently bumping into this (literally today), would like to see this feature as a configuration. |
Beta Was this translation helpful? Give feedback.
-
Ditto … I find this annoying/embarrassing when I just want to reference an issue in my PR and it creates some links in the issue itself. I’m just mentioning it for info, not for the upstream repo to do anything about. |
Beta Was this translation helpful? Give feedback.
-
I’ve seen usage of https://togithub.com/ (a redirect domain) to achieve cross-linking without creating references. This domain is what GitHub - renovatebot/renovate: Universal dependency update tool that fits into your workflows. uses when the bot makes comments. Using an external domain for redirection is not a native GitHub feature tough, and of course the alternative domain may simply vanish or do evil without warning. |
Beta Was this translation helpful? Give feedback.
-
This is a horrible feature to not be able to opt-out of. I’m adding commits in my code to work around issues in someone else’s software; I want to properly document both what I’ve done and the paper trail behind why I’ve done it, but it seems seriously passive-aggressive to be piling events onto the issue I just reported… “No. It’s fine. I’ll just polyfill it myself.” 🤣 |
Beta Was this translation helpful? Give feedback.
-
FWIW one imperfect solution is to surround the link with backticks. This does in fact NOT create a link, but it’s not that annoying to copy and follow the link (some might even have mouse/keyboard shortcuts to do just that). I prefer that over relying that togithub.com will have the same lifetime as github.com |
Beta Was this translation helpful? Give feedback.
-
Is there still no official solution? Spamming issues and PRs with those “mentioned” references just makes me feel bad in some cases (and sometimes including the reference in a commit message results in further indirect spam when other people create copies of that commit by cherry-picking or rebasing). I actually found a way to create a link to a PR that does not count as a mention without using a third-party domain — apparently replacing One feature which gets broken by this change is the pop-up that usually appears when hovering over a link to a GitHub issue or PR — the link to Of course, GitHub owners could break this at any time by treating links to |
Beta Was this translation helpful? Give feedback.
-
So just to clarify the problem... When a comment in issue A references issue B:
I would hope to see GitHub make these changes:
|
Beta Was this translation helpful? Give feedback.
-
Probably the only way to get Github to address it is when it poses more of a problem to raise priority? 😕 (malicious spam activity to the point that banning accounts is ineffective? 🤷♂️ ) I've seen various lengthy PRs in the past get affected by this issue unintentionally. Sometimes the commit author may not even be aware everytime they rewrite history that updates the affected commit hash to a new one it appends another reference to the issue or PR, CI could make that a frequent event to carry a patch for example. While that can pollute an issue or PR discussion (mostly problematic when it's enough times that it triggers the web UI to hide earlier items like actual comments that have much more value), I've also witnessed a related problem with Sometimes I am mentioned in a commit message and this will trigger a notification. The repo can be cloned and published as a new repo instead of forked, and this will likewise apply any commit message references including those mention notifications. If there is a CI involved that's rewriting commit history that can be quite annoying 😅 (again usually unintentional, but I've also seen attempts to steal and rebrand projects by rewriting commit authors where the ping was useful) |
Beta Was this translation helpful? Give feedback.
-
permalink not work in issues of my personal github repo? |
Beta Was this translation helpful? Give feedback.
No, there isn’t a way to prevent that cross-linking from occurring. On the flip side, that cross-link event is only visible to the people that have access to the repository from which the link originated. So if you link to a public repository from a private repository of your own, the only people that will be able to see the link event is yourself and whomever you grant access to your private repository.
I hope that helps!