Skip to content

Recognize issue/MR/snippet/commit links as references.

Douwe Maan requested to merge link-refs into master
  • Commit references should be rendered with short SHA, but would ideally be in the source with the full SHA
  • http://google.com/#16 should be one link, not one to http://google.com/ and one to issue number 16.

Source:

Links as references!

http://gitlab.dev/gitlab-org/gitlab-ce/issues/10.

http://gitlab.dev/gitlab-org/gitlab-ce/issues/10#note_174

http://gitlab.dev/gitlab-org/gitlab-test/merge_requests/22?view=diff

http://gitlab.dev/gitlab-org/gitlab-test/merge_requests/22/diffs#note_174

http://gitlab.dev/gitlab-org/gitlab-test/commit/2a92d448c22bfd83f2ec537ad110a82ab885689e

http://gitlab.dev/gitlab-org/gitlab-test/commit/2a92d448c22bfd83f2ec537ad110a82ab885689e#note_174

http://gitlab.dev/gitlab-org/gitlab-test/compare/6fb698ea6de2c17a206cedd4d4bc3ae588fa6dd9...9c2d4a00df4297da38788d9d87e1093c0a8cf8b8

http://gitlab.dev/gitlab-org/gitlab-test/compare/6fb698ea6de2c17a206cedd4d4bc3ae588fa6dd9...master

http://gitlab.dev/gitlab-org/gitlab-test/snippets/54

http://gitlab.dev/gitlab-org/gitlab-test/snippets/54#note_174

[Issue reference in href](gitlab-org/gitlab-ce#10)

[MR reference in href](!22)

[Commit reference in href](2a92d448c22bfd83f2ec537ad110a82ab885689e)

[Commit range reference in href](6fb698ea6de2c17a206cedd4d4bc3ae588fa6dd9...9c2d4a00df4297da38788d9d87e1093c0a8cf8b8)

[Snippet reference in href](gitlab-org/gitlab-test$54)

[User reference in href](@DouweM)

[Label reference in href](~test)

Fixes `#16`, gitlab-org/gitlab-test#10, http://gitlab.dev/gitlab-org/gitlab-ce/issues/9, [issue 6](http://gitlab.dev/gitlab-org/gitlab-ce/issues/6) and [issue 4](#4)

Result:

Screen_Shot_2015-12-01_at_17.06.53

All links are recognized as such. Note that issue 6 and issue 4 in the Fixes ... line aren't picked up as closed by this MR, since they don't match the closing issue pattern. The pattern does match regular references, cross-project references and URL references.

cc @rspeicher @dzaporozhets @JobV @sytses

Fixes #3744 (closed) and #3745 (closed)

Merge request reports

Loading