-
-
Notifications
You must be signed in to change notification settings - Fork 771
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
Issue Explorer Check in tools for Admin (Vivek) #1446
Conversation
@@ -655,6 +670,69 @@ var do_actions = function(result) { | |||
|
|||
actions.push(_entry); | |||
} | |||
if (show_suspend_auto_approval) { | |||
var url = result['url'] + '?suspend_auto_approval=1'; |
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.
'url' used outside of binding context. (block-scoped-var)
if (show_suspend_auto_approval) { | ||
var url = result['url'] + '?suspend_auto_approval=1'; | ||
|
||
var _entry = { |
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.
'_entry' used outside of binding context. (block-scoped-var)
'_entry' is already defined. (no-redeclare)
|
||
var _entry = { | ||
enabled: true, | ||
href: url, |
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.
'url' used outside of binding context. (block-scoped-var)
buttonclass: 'admin-only' | ||
}; | ||
|
||
actions.push(_entry); |
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.
'_entry' used outside of binding context. (block-scoped-var)
} | ||
|
||
if (show_admin_override_and_hide) { | ||
var url = result['url'] + '?admin_override_and_hide=1'; |
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.
'url' used outside of binding context. (block-scoped-var)
'url' is already defined. (no-redeclare)
@@ -477,6 +477,8 @@ def create_new_bounty(old_bounties, bounty_payload, bounty_details, bounty_id): | |||
last_comment_date=latest_old_bounty.last_comment_date if latest_old_bounty else None, | |||
snooze_warnings_for_days=latest_old_bounty.snooze_warnings_for_days if latest_old_bounty else 0, | |||
admin_override_and_hide=latest_old_bounty.admin_override_and_hide if latest_old_bounty else 0, | |||
admin_override_suspend_auto_approval=latest_old_bounty.admin_override_suspend_auto_approval if latest_old_bounty else 0, |
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.
E501 line too long (136 > 120 characters)
app/dashboard/models.py
Outdated
@@ -195,6 +195,8 @@ class Bounty(SuperModel): | |||
value_true = models.DecimalField(default=0, decimal_places=2, max_digits=50, blank=True, null=True) | |||
privacy_preferences = JSONField(default={}, blank=True) | |||
admin_override_and_hide = models.BooleanField(default=False, help_text=_('Admin override to hide the bounty from the system')) | |||
admin_override_suspend_auto_approval = models.BooleanField(default=False, help_text=_('Admin override to suspend work auto approvals')) |
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.
E501 line too long (139 > 120 characters)
app/dashboard/models.py
Outdated
@@ -195,6 +195,8 @@ class Bounty(SuperModel): | |||
value_true = models.DecimalField(default=0, decimal_places=2, max_digits=50, blank=True, null=True) | |||
privacy_preferences = JSONField(default={}, blank=True) | |||
admin_override_and_hide = models.BooleanField(default=False, help_text=_('Admin override to hide the bounty from the system')) | |||
admin_override_suspend_auto_approval = models.BooleanField(default=False, help_text=_('Admin override to suspend work auto approvals')) | |||
admin_mark_as_remarket_ready = models.BooleanField(default=False, help_text=_('Admin override to mark as remarketing ready')) |
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.
E501 line too long (129 > 120 characters)
app/dashboard/views.py
Outdated
helper_handle_suspend_auto_approval(request, bounty) | ||
helper_handle_mark_as_remarket_ready(request, bounty) | ||
helper_handle_admin_contact_funder(request, bounty) | ||
|
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.
W293 blank line contains whitespace
start_time = timezone.now() - timezone.timedelta(hours=(threshold+1)) | ||
end_time = timezone.now() - timezone.timedelta(hours=(threshold)) | ||
interests = Interest.objects.filter(pending=True, created__gt=start_time, created__lt=end_time) | ||
print(f"{interests.count()} {action_str}") | ||
for interest in interests: | ||
bounty = interest.bounties.first() # TODO is this right? is this how i get the bounty? | ||
bounty = interest.bounties.first() |
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.
W291 trailing whitespace
Codecov Report
@@ Coverage Diff @@
## master #1446 +/- ##
==========================================
- Coverage 30.28% 30.14% -0.15%
==========================================
Files 125 125
Lines 9096 9166 +70
Branches 1166 1178 +12
==========================================
+ Hits 2755 2763 +8
- Misses 6232 6294 +62
Partials 109 109
Continue to review full report at Codecov.
|
buttonclass: 'admin-only' | ||
}; | ||
|
||
actions.push(_entry); |
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.
'_entry' used outside of binding context. (block-scoped-var)
buttonclass: 'admin-only' | ||
}; | ||
|
||
actions.push(_entry); |
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.
'_entry' used outside of binding context. (block-scoped-var)
buttonclass: 'admin-only' | ||
}; | ||
|
||
actions.push(_entry); |
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.
'_entry' used outside of binding context. (block-scoped-var)
if (show_admin_toggle_remarket) { | ||
var url = result['url'] + '?admin_toggle_as_remarket_ready=1'; | ||
|
||
var _entry = { |
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.
'_entry' used outside of binding context. (block-scoped-var)
'_entry' is already defined. (no-redeclare)
buttonclass: 'admin-only' | ||
}; | ||
|
||
actions.push(_entry); |
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.
'_entry' used outside of binding context. (block-scoped-var)
} | ||
|
||
if (show_admin_snooze) { | ||
var url = ''; |
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.
'url' used outside of binding context. (block-scoped-var)
'url' is already defined. (no-redeclare)
if (show_admin_snooze) { | ||
var url = ''; | ||
|
||
var _entry = { |
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.
'_entry' used outside of binding context. (block-scoped-var)
'_entry' is already defined. (no-redeclare)
|
||
var _entry = { | ||
enabled: true, | ||
href: url, |
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.
'url' used outside of binding context. (block-scoped-var)
buttonclass: 'admin-only snooze_gitcoin_bot' | ||
}; | ||
|
||
actions.push(_entry); |
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.
'_entry' used outside of binding context. (block-scoped-var)
buttonclass: 'admin-only' | ||
}; | ||
|
||
actions.push(_entry); |
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.
'_entry' used outside of binding context. (block-scoped-var)
if (show_admin_toggle_remarket) { | ||
var url = result['url'] + '?admin_toggle_as_remarket_ready=1'; | ||
|
||
var _entry = { |
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.
'_entry' used outside of binding context. (block-scoped-var)
'_entry' is already defined. (no-redeclare)
buttonclass: 'admin-only' | ||
}; | ||
|
||
actions.push(_entry); |
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.
'_entry' used outside of binding context. (block-scoped-var)
|
||
var _entry = { | ||
enabled: true, | ||
href: url, |
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.
'url' used outside of binding context. (block-scoped-var)
buttonclass: 'admin-only' | ||
}; | ||
|
||
actions.push(_entry); |
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.
'_entry' used outside of binding context. (block-scoped-var)
if (show_admin_toggle_remarket) { | ||
var url = result['url'] + '?admin_toggle_as_remarket_ready=1'; | ||
|
||
var _entry = { |
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.
'_entry' used outside of binding context. (block-scoped-var)
'_entry' is already defined. (no-redeclare)
buttonclass: 'admin-only' | ||
}; | ||
|
||
actions.push(_entry); |
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.
'_entry' used outside of binding context. (block-scoped-var)
|
||
var _entry = { | ||
enabled: true, | ||
href: url, |
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.
'url' used outside of binding context. (block-scoped-var)
buttonclass: 'admin-only' | ||
}; | ||
|
||
actions.push(_entry); |
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.
'_entry' used outside of binding context. (block-scoped-var)
if (show_admin_toggle_remarket) { | ||
var url = result['url'] + '?admin_toggle_as_remarket_ready=1'; | ||
|
||
var _entry = { |
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.
'_entry' used outside of binding context. (block-scoped-var)
'_entry' is already defined. (no-redeclare)
buttonclass: 'admin-only' | ||
}; | ||
|
||
actions.push(_entry); |
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.
'_entry' used outside of binding context. (block-scoped-var)
|
||
var _entry = { | ||
enabled: true, | ||
href: url, |
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.
'url' used outside of binding context. (block-scoped-var)
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.
Generally, lgtm. I pushed a commit to consolidate the migration files and resolve the pytest failure. I'm not sure if we want to address the eslint
warnings that stickler is commenting about, but 🚢
Description
Issue Explorer Check in tools for Admin (Vivek)
Per my convo with Vivek on our checkin today, we need a better way to make the issue explorer checkin scale. This PR adds five buttons to each bounty for admins only
Checklist
Affected core subsystem(s)
bounties, admin
Testing
tested each function
Refers/Fixes
Self, convo I had with Vivek this am