Skip to content

Commit

Permalink
add author to PR merge summary
Browse files Browse the repository at this point in the history
  • Loading branch information
javierggt committed Dec 8, 2020
1 parent 5afc5f9 commit f948cfb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 2 deletions.
5 changes: 5 additions & 0 deletions skare3_tools/github/graphql.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,6 +308,11 @@ class AuthException(Exception):
nodes {
oid
message
author {
user {
login
}
}
}
}
}
Expand Down
6 changes: 6 additions & 0 deletions skare3_tools/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,11 @@ def _get_tag_target(tag):
oid
message
pushedDate
author {
user {
login
}
}
}
}
}
Expand Down Expand Up @@ -406,6 +411,7 @@ def _get_repository_info_v4(owner_repo,
commit['message'])
if match:
merge = match.groupdict()
merge['author'] = commit['author']['user']['login']
merge["pr_number"] = int(merge["pr_number"])
if use_pr_titles:
if merge["pr_number"] in all_pull_requests:
Expand Down
5 changes: 3 additions & 2 deletions skare3_tools/scripts/skare3_update_summary.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ def repository_change_summary(pkgs_repo_info, initial_versions='flight', final_v
merges.append({
'PR': pr,
'url': url,
'description': merge['title']
'description': merge['title'],
'author': merge['author']
})
update_info.update({
'versions': [version_1] + releases[::-1],
Expand Down Expand Up @@ -136,7 +137,7 @@ def write_conda_pkg_change_summary(change_summary):
{{ v }}{{ " -> " if not loop.last }}
{%- endfor %}){% endif %}
{%- for merge in package.merges %}
- [PR {{ merge.PR }}](https://github.com/{{ merge.url }}): {{ merge.description }}
- [PR {{ merge.PR }}](https://github.com/{{ merge.url }}) ({{ merge.author }}): {{ merge.description }}
{%- endfor %}
{% endfor %}
"""
Expand Down

0 comments on commit f948cfb

Please sign in to comment.