24
24
PRIVATE_REPO_MILESTONE = app .config ['PRIVATE_REPO_MILESTONE' ]
25
25
26
26
27
- def unmoderated_issue ():
27
+ def moderation_template ():
28
28
"""Gets the placeholder data to send for unmoderated issues."""
29
- # TODO: Replace this with something meaningful.
30
- # See https://github.com/webcompat/webcompat.com/issues/3137
31
- summary = 'Placeholder in-moderation title.'
32
- body = 'Placeholder in-moderation body.'
29
+
30
+ summary = 'In the moderation queue.'
31
+ body = '''<p>This issue has been put in the moderation queue. A human
32
+ will review if the message meets our current
33
+ <a href="https://www.mozilla.org/en-US/about/legal/acceptable-use/">
34
+ acceptable use</a> guidelines.
35
+ It will probably take a couple of days depending on the backlog.
36
+ Once it has been reviewed, the content will be either made public
37
+ or deleted.</p>'''
33
38
return {'title' : summary , 'body' : body }
34
39
35
40
@@ -51,13 +56,13 @@ def report_private_issue(form, public_url):
51
56
return None
52
57
53
58
54
- def report_public_issue (form ):
59
+ def report_public_issue ():
55
60
"""Report the issue publicly.
56
61
57
62
Returns a requests.Response object.
58
63
"""
59
64
path = 'repos/{0}' .format (REPO_URI )
60
- return proxy_request ('post' , path , data = json .dumps (unmoderated_issue ()))
65
+ return proxy_request ('post' , path , data = json .dumps (moderation_template ()))
61
66
62
67
63
68
def report_issue (form , proxy = False ):
@@ -66,7 +71,7 @@ def report_issue(form, proxy=False):
66
71
path = 'repos/{0}' .format (REPO_URI )
67
72
submit_type = form .get ('submit_type' )
68
73
if proxy and submit_type == 'github-proxy-report' :
69
- response = report_public_issue (form )
74
+ response = report_public_issue ()
70
75
if (response .status_code == 201 ):
71
76
json_response = response .json ()
72
77
report_private_issue (form , json_response .get ('html_url' ))
0 commit comments