Remove unnecessary rev-parse in favor of in_changelog

This commit is contained in:
Mikhail f. Shiryaev 2024-06-04 21:24:34 +02:00
parent bad3f2d384
commit af0ea585fc
No known key found for this signature in database
GPG Key ID: 4B02ED204C7D93F4

View File

@ -100,17 +100,14 @@ def get_descriptions(prs: PullRequests) -> Dict[str, List[Description]]:
# obj._rawData doesn't spend additional API requests
# We'll save some requests
# pylint: disable=protected-access
repo_name = pr._rawData["base"]["repo"]["full_name"] # type: ignore
repo_name = pr._rawData["base"]["repo"]["full_name"]
# pylint: enable=protected-access
if repo_name not in repos:
repos[repo_name] = pr.base.repo
in_changelog = False
merge_commit = pr.merge_commit_sha
try:
runner.run(f"git rev-parse '{merge_commit}'")
except CalledProcessError:
# It's possible that commit not in the repo, just continue
logging.info("PR %s does not belong to the repo", pr.number)
if merge_commit is None:
logging.warning("PR %s does not have merge-commit, skipping", pr.number)
continue
in_changelog = merge_commit in SHA_IN_CHANGELOG