Skip to content

Commit

Permalink
Replace occurrences of @ with & in the textual content
Browse files Browse the repository at this point in the history
See #7 for additional details
  • Loading branch information
gridhead committed Sep 25, 2023
1 parent f73d72c commit af5a749
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions protop2g/work/tkts.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,11 @@ def itertkts(self, dictobjc):
hh=datetime.utcfromtimestamp(standard.timedata).strftime("%H"),
mm=datetime.utcfromtimestamp(standard.timedata).strftime("%M"),
)
rqstdata = {"title": headdata, "description": bodydata}
"""
Replace "@" in the `bodydata` with "&" to ensure that wrong people are not referenced in the destination namespace
Check https://github.com/gridhead/protop2g/issues/7 for more information about the problem
"""
rqstdata = {"title": headdata, "description": bodydata.replace("@", "&")}
response = requests.post(url=f"{self.gurl}/issues", data=rqstdata, headers=self.ghed)
respcode, respresn = response.status_code, response.reason
if respcode == 201:
Expand Down Expand Up @@ -153,7 +157,11 @@ def itercmts(self, dictobjc):
hh=datetime.utcfromtimestamp(standard.cmtstime).strftime("%H"),
mm=datetime.utcfromtimestamp(standard.cmtstime).strftime("%M"),
)
rqstdata = {"body": bodydata}
"""
Replace "@" in the `bodydata` with "&" to ensure that wrong people are not referenced in the destination namespace
Check https://github.com/gridhead/protop2g/issues/7 for more information about the problem
"""
rqstdata = {"body": bodydata.replace("@", "&")}
response = requests.post(url=f"{self.gurl}/issues/{standard.gtlbtkid}/notes", data=rqstdata, headers=self.ghed)
respcode, respresn = response.status_code, response.reason
if respcode == 201:
Expand Down

0 comments on commit af5a749

Please sign in to comment.