MCPcopy Create free account
hub / github.com/apache/arrow / format_issue_output

Function format_issue_output

dev/merge_arrow_pr.py:221–244  ·  view source on GitHub ↗
(issue_type, issue_id, status,
                        summary, assignee, components)

Source from the content-addressed store, hash-verified

219
220
221def format_issue_output(issue_type, issue_id, status,
222 summary, assignee, components):
223 if not assignee:
224 assignee = "NOT ASSIGNED!!!"
225 else:
226 assignee = getattr(assignee, "displayName", assignee)
227
228 if len(components) == 0:
229 components = 'NO COMPONENTS!!!'
230 else:
231 components = ', '.join((getattr(x, "name", x) for x in components))
232
233 url_id = issue_id
234 if "GH" in issue_id:
235 url_id = issue_id.replace("GH-", "")
236
237 url = f'https://github.com/{ORG_NAME}/{PROJECT_NAME}/issues/{url_id}'
238
239 return f"""=== {issue_type.upper()} {issue_id} ===
240Summary\t\t{summary}
241Assignee\t{assignee}
242Components\t{components}
243Status\t\t{status}
244URL\t\t{url}"""
245
246
247class GitHubAPI(object):

Callers 1

showMethod · 0.85

Calls 2

lenFunction · 0.85
joinMethod · 0.45

Tested by

no test coverage detected