Skip to content

Commit 34658d5

Browse files
committed
v2 api changes in week leanrings html
1 parent cf47d01 commit 34658d5

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

v2_app.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ def get_issues_by_owner_id_v2(owner, issue):
5757
if not cont_details:
5858
cont_details = dmp_issue_id['contributor_username']
5959
week_data = week_data_formatter(plain_text_body,"Goals")
60-
6160
res = {
6261
"name": dmp_issue_id['title'],
6362
"description": dmp_issue_id['description'],

v2_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ def week_data_formatter(html_content, type):
3636
weekly_updates = []
3737

3838
if type == "Learnings":
39+
# tasks_per_week = re.split(r'<h3>Week \d+</h3>', html_content)[1:]
40+
tasks_per_week = re.split(r'(<.*?>Week \d+<.*?>)', html_content)[1:]
41+
tasks_per_week = [tasks_per_week[i] for i in range(1, len(tasks_per_week), 2)]
3942
for i, week in enumerate(week_matches):
4043
task_list_html = tasks_per_week[i] if i < len(tasks_per_week) else ""
4144
weekly_updates.append({

0 commit comments

Comments
 (0)