Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pull request compare link #1832

Merged
merged 2 commits into from
May 31, 2017
Merged

Conversation

ethantkoenig
Copy link
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
Copy link
Member

lunny commented May 30, 2017

.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
Copy link
Member

lunny commented May 30, 2017

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
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
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
Copy link
Member

lafriks commented May 30, 2017

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

@lunny
Copy link
Member

lunny commented May 31, 2017

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
Copy link
Member

lafriks commented May 31, 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 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