Skip to content

Commit

Permalink
address comments from code review
Browse files Browse the repository at this point in the history
As title
  • Loading branch information
esc committed Jul 6, 2023
1 parent 2aaa77d commit f681a84
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions maint/github_weekly_meeting.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
import github3


def fetch(target_repo, last_num, gh):
orgname, reponame = target_repo.split('/', 1)
def fetch(orgname, reponame, last_num, gh):

repo = gh.repository(orgname, reponame)
issues = repo.issues(state='all')
Expand Down Expand Up @@ -38,15 +37,8 @@ def fetch(target_repo, last_num, gh):
# Is Issues
where = {'opened': opened_issues, 'closed': closed_issues}

fmt = '- [{}#{}]({}) - {}'
if merged:
fmt = "- merged " + fmt
line = fmt.format(
reponame,
info['number'],
info['html_url'],
info['title'],
)
line = f"{' - merged ' if merged else ''}- [{reponame}"\
f"#{info['number']}]({info['html_url']}) - {info['title']}"

# Is issue already merged
if issue.is_closed():
Expand Down Expand Up @@ -90,8 +82,9 @@ def main(numba_last_num, llvmlite_last_num, user=None, password=None):
gh = login(str(user), password=str(password))
else:
gh = github3
numba_data = fetch("numba/numba", numba_last_num, gh)
llvmlite_data = fetch("numba/llvmlite", llvmlite_last_num, gh)

numba_data = fetch("numba", "numba", numba_last_num, gh)
llvmlite_data = fetch("numba", "llvmlite", llvmlite_last_num, gh)

# combine data
data = {
Expand Down

0 comments on commit f681a84

Please sign in to comment.