Add "Reference: " copy-pastable reference when viewing an issue #8907

Closed
opened 2025-11-02 08:22:48 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @neonn on GitHub (May 4, 2022).

When viewing an issue in GitLab, you can quickly copy a reference to the issue being viewed.

This is useful for comments in issues, as it is a convenient way of referencing the issue in other issues in other Markdown inputs, or wherever shorthand issue references can be used. Below is an example issue using GitLab and a public issue. Note the "References: ..." string and icon in the bottom-right of the image, showing the reference.

Example of the GitLab issue tracker, with the references section of the right menu. Note the copy-paste icon as well as the "References: ..." text

The above example is from the Freedesktop GitLab instance.

The format of this string is <project-name>/<repository-name>#<repository-issue-index>, where:

  • project-name: Name of the project (e.g. go-gitea)
  • repository-name: Name of the repository (e.g. gitea)
  • repository-issue-index: Index number of the repository (e.g. 1)

For example, a reference to a project might look like: go-gitea/gitea#2

Clicking the "Copy reference" button copies the reference to the issue to the user's clipboard.

I have discussed this a little with @Gusted on 2022/04/30 in Discord, in #develop. Thank you for the Go code! 😃

I will follow up with a PR in a moment.

Originally created by @neonn on GitHub (May 4, 2022). When viewing an issue in GitLab, you can quickly copy a reference to the issue being viewed. This is useful for comments in issues, as it is a convenient way of referencing the issue in other issues in other Markdown inputs, or wherever shorthand issue references can be used. Below is an example issue using GitLab and a public issue. Note the "References: ..." string and icon in the bottom-right of the image, showing the reference. ![Example of the GitLab issue tracker, with the references section of the right menu. Note the copy-paste icon as well as the "References: ..." text](https://user-images.githubusercontent.com/78957398/166682699-33c8a372-b9a7-436b-bd24-0e2d66d172a3.png) [The above example is from the Freedesktop GitLab instance](https://gitlab.freedesktop.org/freetype/freetype-demos/-/issues/5). The format of this string is `<project-name>/<repository-name>#<repository-issue-index>`, where: - `project-name`: Name of the project (e.g. `go-gitea`) - `repository-name`: Name of the repository (e.g. `gitea`) - `repository-issue-index`: Index number of the repository (e.g. `1`) For example, a reference to a project might look like: `go-gitea/gitea#2` Clicking the "Copy reference" button copies the reference to the issue to the user's clipboard. I have discussed this a little with [@Gusted on 2022/04/30 in Discord, in `#develop`](https://discord.com/channels/322538954119184384/322910365237248000/970078631512653894). Thank you for the Go code! :smiley: I will follow up with a PR in a moment.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8907