Skip to content

Commit

Permalink
fixes bug when extracting text from Jira Refs
Browse files Browse the repository at this point in the history
  • Loading branch information
lauraschauer committed Aug 16, 2024
1 parent 552509b commit 3be03fb
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions prospector/util/http.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,17 +106,13 @@ def get_from_xml(id: str):
try:
params = {"field": {"description", "summary", "comments"}}

# response = requests.get(
# f"https://issues.apache.org/jira/si/jira.issueviews:issue-xml/{id}/{id}.xml",
# params=params,
# )
# xml_data = BeautifulSoup(response.text, features="html.parser")
xml_data = fetch_url(
f"https://issues.apache.org/jira/si/jira.issueviews:issue-xml/{id}/{id}.xml",
params=params,
extract_text=False,
)
item = xml_data.find("item")
if item is None:
if item is None or item == -1:
return ""
relevant_data = [
itm.text for itm in item.findAll(["description", "summary", "comments"])
Expand Down

0 comments on commit 3be03fb

Please sign in to comment.