Skip to content

Conversation

lafriks
Copy link
Member

@lafriks lafriks commented May 4, 2017

Fixes #1667

@@ -296,6 +296,7 @@ func TestRender_Commits(t *testing.T) {
test(sha, `<p><a href="`+commit+`" rel="nofollow">b6dd6210ea</a></p>`)
test(commit, `<p><a href="`+commit+`" rel="nofollow">b6dd6210ea</a></p>`)
test(tree, `<p><a href="`+src+`" rel="nofollow">b6dd6210ea/src</a></p>`)
test("commit "+sha, `<p>commit <a href="`+commit+`" rel="nofollow">b6dd6210ea</a></p>`)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I won't ask for this PR but it would be better if the short sha is not hardcoded but derived from sha in test result (in the future ^^).

@@ -542,7 +542,7 @@ func RenderCrossReferenceIssueIndexPattern(rawBytes []byte, urlPrefix string, me
func renderSha1CurrentPattern(rawBytes []byte, urlPrefix string) []byte {
ms := Sha1CurrentPattern.FindAllSubmatch(rawBytes, -1)
for _, m := range ms {
all := m[0]
all := m[1]
Copy link
Member

@sapk sapk May 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should not call it all now that it right fully catch only the commitId/sha1.

@sapk
Copy link
Member

sapk commented May 4, 2017

I have made two comments that are non blocking just improvement. Otherwise LGTM.

@tboerger tboerger added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label May 4, 2017
@lunny lunny added this to the 1.2.0 milestone May 5, 2017
@lunny lunny added the type/bug label May 5, 2017
@appleboy
Copy link
Member

appleboy commented May 5, 2017

LGTM

@tboerger tboerger added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels May 5, 2017
@lafriks
Copy link
Member Author

lafriks commented May 5, 2017

Changed variable name as requested :)

@lunny lunny merged commit 9a0b0da into go-gitea:master May 5, 2017
@lafriks lafriks deleted the issue/1667 branch May 7, 2017 16:42
@go-gitea go-gitea locked and limited conversation to collaborators Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issues: Commit hash not parsed
5 participants