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

Add "accepted: invalid" or "accepted: incomplete" milestones to moderation workflow #3445

Closed
miketaylr opened this issue Aug 7, 2020 · 1 comment

Comments

@miketaylr
Copy link
Member

Now that #3291 is done, this should be less messy to implement.

The idea is described in option 3 here:

add some common milestones like "accepted: invalid" or "accepted: incomplete". Once you change the milestone, we have the app close the issue, and put in some template comment on the public issue, and close that issue.

I think those 2 should be sufficient. The implementation would be to add some logic to process_issue_action to check the milestone and then probably add 1 or 2 methods to WebHookIssue to update the public issue (the rest should already be possible):

  1. add some boilerplate message about being invalid or incomplete
  2. change the milestone to invalid or incomplete
  3. close the public issue
  4. close the private issue

Somewhere around here:

elif (issue.action == 'milestoned' and scope == 'private' and
issue.milestoned_with == 'accepted'):
# private issue have been moderated and we will make it public
try:
issue.moderate_private_issue()
except HTTPError as e:
msg_log('private:moving to public failed', issue.number)
return oops()
else:
# we didn't get exceptions, so it's safe to close it
issue.close_private_issue()
return make_response('Moderated issue accepted', 200)
elif (scope == 'private' and issue.state == 'closed' and

@miketaylr
Copy link
Member Author

Probably a good opportunity to move

def prepare_rejected_issue():
into WebHookIssue, as a staticmethod.

@miketaylr miketaylr self-assigned this Aug 17, 2020
miketaylr pushed a commit that referenced this issue Aug 18, 2020
miketaylr pushed a commit that referenced this issue Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant