-
-
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
escalation not removal #1058
escalation not removal #1058
Conversation
|
Does this mean we'd have manual intervention for every issue that has been ignored by the bounty hunter which he's started work on ? |
yes thats the plan |
if not settings.SLACK_TOKEN or bounty.get_natural_value() < 0.0001 or ( | ||
bounty.network != settings.ENABLE_NOTIFICATIONS_ON_NETWORK): | ||
return False | ||
|
||
msg = f"@{username} has been removed from {bounty.github_url} due to inactivity on the github thread." | ||
msg = f"@vivek, {bounty.github_url} is being escalated to you, due to inactivity for {last_heard_from_user_days} days from @{username} on the github thread." |
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.
We could make a gitcoinco
moderators team of anyone that will potentially triage this type of situation (i.e. vivek
at the moment) and @
mention the team here versus vivek
.
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.
For instance @gitcoinco/moderators
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.
sure.. but this is a slack message not a github message :P
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.
Exceptionally derp today.
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.
|
||
|
||
|
||
def record_user_action_on_interest(interest, event_name, last_heard_from_user_days): |
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.
Docstrings 😢
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.
@mbeacom just fixed the tests |
if not settings.SLACK_TOKEN or bounty.get_natural_value() < 0.0001 or ( | ||
bounty.network != settings.ENABLE_NOTIFICATIONS_ON_NETWORK): | ||
return False | ||
|
||
msg = f"@{username} has been removed from {bounty.github_url} due to inactivity on the github thread." | ||
msg = f"@vivek, {bounty.github_url} is being escalated to you, due to inactivity for {last_heard_from_user_days} days from @{username} on the github thread." |
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 (161 > 120 characters)
@@ -749,10 +749,10 @@ def maybe_notify_user_removed_github(bounty, username, last_heard_from_user_days | |||
|
|||
status_header = get_status_header(bounty) | |||
|
|||
msg = f"""{status_header}@{username} has been removed for inactivity and [the issue]({bounty.url}) has been returned to an ‘Open’ Status. Let us know if you believe this has been done in error! | |||
msg = f"""{status_header}@{username} due to inactivity, we have escalated [this issue]({bounty.url}) to Gitcoin's moderation team. Let us know if you believe this has been done in error! |
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 (180 > 120 characters)
|
||
|
||
|
||
def record_user_action_on_interest(interest, event_name, last_heard_from_user_days): |
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.
E303 too many blank lines (3)
return JsonResponse({ | ||
'error': _('Due to a prior abandoned bounty, you are unable to start work at this time. Please contact support.'), | ||
'error': _('Because a staff member has had to remove you from a bounty in the past, you are unable to start more work at this time. Please contact support.'), |
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 (170 > 120 characters)
record_user_action(interest, 'bounty_abandonment_final', last_heard_from_user_days) | ||
|
||
interest.delete() | ||
record_user_action_on_interest(interest, 'bounty_abandonment_escalation_to_mods', last_heard_from_user_days) |
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)
# commenting in slack | ||
maybe_notify_bounty_user_removed_to_slack(bounty, interest.profile.handle) | ||
maybe_notify_bounty_user_escalated_to_slack(bounty, interest.profile.handle, last_heard_from_user_days) | ||
|
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
# send email | ||
bounty_startwork_expired(interest.profile.email, bounty, interest, last_heard_from_user_days) | ||
|
||
elif should_warn_user: | ||
|
||
record_user_action(interest, 'bounty_abandonment_warning', last_heard_from_user_days) | ||
record_user_action_on_interest(interest, 'bounty_abandonment_warning', last_heard_from_user_days) |
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 (125 > 120 characters)
|
||
print(f'executing should_warn_user for {interest.profile} / {bounty.github_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.
W293 blank line contains whitespace
# commenting on the GH issue | ||
maybe_warn_user_removed_github(bounty, interest.profile.handle, last_heard_from_user_days) | ||
|
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
# commenting in slack | ||
maybe_notify_bounty_user_warned_removed_to_slack(bounty, interest.profile.handle, last_heard_from_user_days) | ||
|
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
Codecov Report
@@ Coverage Diff @@
## master #1058 +/- ##
==========================================
+ Coverage 32.03% 33.19% +1.16%
==========================================
Files 105 105
Lines 7249 7929 +680
Branches 941 1155 +214
==========================================
+ Hits 2322 2632 +310
- Misses 4819 5156 +337
- Partials 108 141 +33
Continue to review full report at Codecov.
|
@@ -486,6 +486,19 @@ def process_bounty_details(bounty_details): | |||
|
|||
|
|||
def record_user_action(event_name, old_bounty, new_bounty): | |||
"""Records a user action |
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
if not settings.SLACK_TOKEN or bounty.get_natural_value() < 0.0001 or ( | ||
bounty.network != settings.ENABLE_NOTIFICATIONS_ON_NETWORK): | ||
return False | ||
|
||
msg = f"@{username} has been removed from {bounty.github_url} due to inactivity on the github thread." | ||
msg = f"@vivek, {bounty.github_url} is being escalated to you, due to inactivity for {last_heard_from_user_days} days from @{username} on the github thread." |
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 (161 > 120 characters)
|
||
|
||
|
||
def record_user_action_on_interest(interest, event_name, last_heard_from_user_days): |
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.
E303 too many blank lines (3)
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.
lgtm!
Description
Checklist
Affected core subsystem(s)
start/ stop work
Refers/Fixes
self/ vivek idea on slack