Skip to content

Commit

Permalink
Merge pull request #20 from Code4GovTech/sasi_dev_v2
Browse files Browse the repository at this point in the history
condition removed in find week datas
  • Loading branch information
sasi2312 authored Jun 18, 2024
2 parents 67df7df + 5a2fab0 commit 948b60b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions v2_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,16 @@ def get_issues_by_owner_id_v2(owner, issue):
# mentors_data = find_mentors(val['issue_url']) if val['issue_url'] else {'mentors': [], 'mentor_usernames': []}

if val['body_text']:
if ("Weekly Goals" in val['body_text'] and not w_goal_url) and ("@"+val['created_by'].lower() == dmp_issue_id['mentor_username'].lower()):
# and ("@"+val['created_by'].lower() == dmp_issue_id['mentor_username'].lower())
if ("Weekly Goals" in val['body_text'] and not w_goal_url):
w_goal_url = val['body_text']
plain_text_body = markdown2.markdown(val['body_text'])
tasks = re.findall(r'\[(x| )\]', plain_text_body)
total_tasks = len(tasks)
completed_tasks = tasks.count('x')
avg = round((completed_tasks/total_tasks)*100) if total_tasks!=0 else 0

if ("Weekly Learnings" in val['body_text'] and not w_learn_url) and ((val['created_by'] == dmp_issue_id['contributor_username'])):
if ("Weekly Learnings" in val['body_text'] and not w_learn_url):
w_learn_url = val['body_text']
plain_text_wurl = markdown2.markdown(val['body_text'])

Expand Down

0 comments on commit 948b60b

Please sign in to comment.