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