Skip to content

Fix pull request compare link - #1832

Merged
appleboy merged 2 commits into
go-gitea:masterfrom
ethantkoenig:fix_compare
May 31, 2017
Merged

Fix pull request compare link#1832
appleboy merged 2 commits into
go-gitea:masterfrom
ethantkoenig:fix_compare

Conversation

@ethantkoenig

Copy link
Copy Markdown
Member

The link should be parentOwner/parent/compare/master...childOwner:master instead of parentOwner/parent/compare/master...parentOwner:master.

Without this fix, the owner of the child repo gets a 404 when they click on the compare-pull-request button on the parent repo's homepage.

@lunny

lunny commented May 30, 2017

Copy link
Copy Markdown
Member

.SignedUser maybe nil?

@tboerger tboerger added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 30, 2017
@lunny

lunny commented May 30, 2017

Copy link
Copy Markdown
Member

Could you add some integration tests

@lunny lunny added this to the 1.2.0 milestone May 30, 2017
@lunny lunny added the type/bug label May 30, 2017
@ethantkoenig

Copy link
Copy Markdown
Member Author

If .SignedUser is nil, then .PullRequestCtx.Allowed will be false, so we don't need to worry about that.

I agree that it would be nice to not have to rely on dependencies between variables like this, but for the purpose of this PR I don't think a large-scale refactor is in order.

@ethantkoenig

Copy link
Copy Markdown
Member Author

It seems to me like an integration test for this would have to rely on finding and following the relevant link in the DOM. I'm a little nervous to add such a test, since it would be fragile if we ever change the underlying templates.

If you have a better approach for an integration test, please let me know.

@lafriks

lafriks commented May 30, 2017

Copy link
Copy Markdown
Member

I think it is ok to relay on DOM for integration tests, if UI is changed tests just need to be updated.

@lunny

lunny commented May 31, 2017

Copy link
Copy Markdown
Member

LGTM

@tboerger tboerger added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 31, 2017
@lafriks

lafriks commented May 31, 2017

Copy link
Copy Markdown
Member

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 31, 2017
@appleboy
appleboy merged commit 5554165 into go-gitea:master May 31, 2017
@ethantkoenig
ethantkoenig deleted the fix_compare branch June 1, 2017 03:45
@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.

5 participants