Skip to content

Commit

Permalink
fix spacing
Browse files Browse the repository at this point in the history
  • Loading branch information
bansalnitish committed Apr 13, 2018
1 parent 1f9b513 commit 9d51b39
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions readthedocs/builds/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from __future__ import absolute_import
from builtins import object
import logging
import textwrap

from django.shortcuts import get_object_or_404
from django.views.generic import ListView, DetailView
Expand Down Expand Up @@ -88,20 +89,26 @@ def get_context_data(self, **kwargs):
"?title={title}{build_id}"
"&body={body}")

body = ("# Details:\n\n"
"*Project URL: https://readthedocs.org/projects/{projname}/\n"
"*Build URL(if applicable): https://readthedocs.org{build_path}\n"
"*Read the Docs username(if applicable): {uname}\n\n"
"## Expected Result\n\n"
"*A description of what you wanted to happen*\n\n"
"## Actual Result\n\n"
"*A description of what actually happened*").format(
body = """
# Details:
*Project URL: https://readthedocs.org/projects/{projname}/
*Build URL(if applicable): https://readthedocs.org{build_path}
*Read the Docs username(if applicable): {uname}
## Expected Result
*A description of what you wanted to happen*
## Actual Result
*A description of what actually happened*""".format(
projname=self.project, build_path=self.request.path,
uname=self.request.user)

scheme_dict = {'title': quote("Build error with build id #"),
'build_id': context['build'].id,
'body': quote(body)}
'body': quote(textwrap.dedent(body))}

issue_url = scheme.format(**scheme_dict)
issue_url = urlparse(issue_url).geturl()
Expand Down

0 comments on commit 9d51b39

Please sign in to comment.