-
-
Notifications
You must be signed in to change notification settings - Fork 775
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
Bounty Payout Milestone 1-Review #5027
Conversation
Organization - name - groups (Many to Many relationship to auth.Group) Model Updates: Profile - organizations (Many to Many relationship to dashboard.Organization) sync_profile updates: - updated to account for change to organizations referenced above New Management Command: - app/management/sync_orgs_repo.py - no arguments presently - designed to be run as a long running cron job
- Reverted the change around profile.organizations due to its usage in user hover cards Profile Model - organizations restored - orgs key added for the sync work
Codecov Report
@@ Coverage Diff @@
## master #5027 +/- ##
=========================================
Coverage ? 17.96%
=========================================
Files ? 207
Lines ? 17473
Branches ? 2399
=========================================
Hits ? 3139
Misses ? 14323
Partials ? 11
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #5027 +/- ##
==========================================
- Coverage 29.72% 29.55% -0.17%
==========================================
Files 236 237 +1
Lines 20005 20166 +161
Branches 2855 2882 +27
==========================================
+ Hits 5946 5960 +14
- Misses 13817 13961 +144
- Partials 242 245 +3
Continue to review full report at Codecov.
|
… and not lose permissions
- stale orgs and groups are now purged from users
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good so far - just a few questions and some style guidelines to make our PRs easy to review 👍
app/dashboard/models.py
Outdated
@@ -121,41 +121,41 @@ def needs_review(self): | |||
"""Filter results by bounties that need reviewed.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this file, can you just include the logic changes and ditch all the style changes? I'm guessing you have some kind of automated tool in your IDE or something like that, and while I appreciate the style fix up, different contributors have different style fixing preferences in their IDEs so we get a lot of PRs where style changes are just going back and forth which makes it hard to review.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noted, will revert those changes, and just add the logic.
… in profile.organizations against profile.orgs
Profile Model Class - repos added - ManyToMany on Repo Organization Class - repos added - ManyToMany on Repo Repos now synced through the sync command
2f3a51b
to
58105e6
Compare
5323ae1
to
7f41c2a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested on my local but there is a problem with the token so is not taking private orgs, left a comment.
- additional exception handling and error messages to help debugging any issues with user profiles - private organizations should now correctly be capturable when they are granted access during login
- adding a per_page limit of 100 to the calls as a stop gap to proper pagination handling
def sync_profile(handle, user=None, hide_profile=True) is getting the profile hidden since is by default |
- added a missing comma as per the PR, - created a merge migration from the most recent master. Merge branch 'master' of github.com:gitcoinco/web into feature/bounty-payout-4969
@androolloyd did you found a way to look around this? |
…ommand(only fetches active user/profiles)
…ensure we aren't changing their profile display status
|
||
if 'message' in org_repos: | ||
print(org_repos['message']) | ||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
^ remove the if block ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, same as above, anytime we see a message key in the returning object, we want to log it and skip to the next element, the error's are vague but are only caused by a couple of things, permissions errors are the most prevelant
Description
New Model:
Model Updates:
sync_profile updates:
New Management Command:
Refers/Fixes
#4969
Testing