Tab on user profile to show starred repos#181
Closed
andreynering wants to merge 4 commits into
Closed
Conversation
Current coverage is 3.02% (diff: 0.00%)@@ master #181 diff @@
========================================
Files 33 34 +1
Lines 8106 8119 +13
Methods 0 0
Messages 0 0
Branches 0 0
========================================
Hits 246 246
- Misses 7840 7853 +13
Partials 20 20
|
Merged
lunny
requested changes
Nov 17, 2016
Member
There was a problem hiding this comment.
I think all the SQL should be executed in one transaction.
Member
There was a problem hiding this comment.
Just use
sess.Join("LEFT", "star", "`user`.id = star.uid")is OK.
Contributor
Author
There was a problem hiding this comment.
@lunny Both of your suggestions was not in code I touched. I just moved it from another file. I only wrote the last function.
Should I fix it in this PR or another one?
lunny
approved these changes
Nov 17, 2016
Contributor
|
LGTM |
lunny
requested changes
Nov 18, 2016
Contributor
Author
|
@lunny Updated |
lunny
requested changes
Nov 20, 2016
Contributor
Author
|
@lunny You was right. Fixed now. |
lunny
requested changes
Nov 21, 2016
| // StarRepo or unstar repository. | ||
| func StarRepo(userID, repoID int64, star bool) error { | ||
| sess := x.NewSession() | ||
|
|
Member
There was a problem hiding this comment.
defer sess.Close()
This must be called and sess.Rollback will be invoked in Close if Commit will not be invoked.
lunny
approved these changes
Nov 24, 2016
Contributor
Author
|
Deprecated in favor of #519 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Improvements pending for future PRs: