Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't steal pull request #575

Merged
merged 1 commit into from
Oct 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions github_app_geo_project/module/standard/changelog.py
Original file line number Diff line number Diff line change
Expand Up @@ -386,23 +386,24 @@ def generate_changelog(
has_pr = False
for pull_request in commit.get_pulls():
has_pr = True
authors = {Author(pull_request.user.login, pull_request.user.html_url)}
for commit_ in pull_request.get_commits():
if commit_.author is not None:
authors.add(Author(commit_.author.login, commit_.author.html_url))
pull_request.as_issue().edit(milestone=milestone)
changelog_items.add(
ChangelogItem(
github=pull_request,
ref=f"#{pull_request.number}",
title=pull_request.title,
author=Author(pull_request.user.login, pull_request.user.html_url),
authors=authors,
branch=pull_request.head.ref,
files={github_file.filename for github_file in pull_request.get_files()},
labels={label.name for label in pull_request.get_labels()},
if pull_request.milestone is None:
authors = {Author(pull_request.user.login, pull_request.user.html_url)}
for commit_ in pull_request.get_commits():
if commit_.author is not None:
authors.add(Author(commit_.author.login, commit_.author.html_url))
pull_request.as_issue().edit(milestone=milestone)
changelog_items.add(
ChangelogItem(
github=pull_request,
ref=f"#{pull_request.number}",
title=pull_request.title,
author=Author(pull_request.user.login, pull_request.user.html_url),
authors=authors,
branch=pull_request.head.ref,
files={github_file.filename for github_file in pull_request.get_files()},
labels={label.name for label in pull_request.get_labels()},
)
)
)
if not has_pr:
author = Author(commit.author.login, commit.author.html_url) if commit.author else None
changelog_items.add(
Expand Down