diff --git a/github_app_geo_project/module/pull_request/checks.py b/github_app_geo_project/module/pull_request/checks.py index 4fd86c05ffb..745b67376af 100644 --- a/github_app_geo_project/module/pull_request/checks.py +++ b/github_app_geo_project/module/pull_request/checks.py @@ -44,10 +44,12 @@ def _get_code_spell_command( ".spell-ignore-words.txt", ): try: - content = context.github_project.repo.get_contents(spell_ignore_file) + content = context.github_project.repo.get_contents( + spell_ignore_file, ref=context.event_data.get("pull_request", {}).get("head", {}).get("sha") + ) if isinstance(content, github.ContentFile.ContentFile): ignore_file.write(content.decoded_content.decode("utf-8")) - ignore_file.close() + ignore_file.flush() command.append(f"--ignore-words={ignore_file.name}") break except github.GithubException as exc: diff --git a/github_app_geo_project/module/standard/changelog.py b/github_app_geo_project/module/standard/changelog.py index 54225207cc8..ad0317f290b 100644 --- a/github_app_geo_project/module/standard/changelog.py +++ b/github_app_geo_project/module/standard/changelog.py @@ -489,6 +489,7 @@ def get_actions(self, context: module.GetActionContext) -> list[module.Action[di ) and event_data.get("pull_request", {}).get("state") == "closed" and event_data.get("pull_request", {}).get("milestone") + and event_data.get("sender", {}).get("login") != context.github_application.name + "[bot]" ): return [module.Action(priority=module.PRIORITY_CRON, data={"type": "pull_request"})] if event_data.get("action") == "edited" and "milestone" in event_data: