From bd6fc36d7ea0a077eba4e0567ac21dccd03d67a6 Mon Sep 17 00:00:00 2001 From: Frank Chen Date: Wed, 3 Jun 2026 10:03:53 -0700 Subject: [PATCH] fix: duplicate build runs for PR --- .github/scripts/lintcommit.py | 6 ++++-- .github/workflows/ci.yml | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/scripts/lintcommit.py b/.github/scripts/lintcommit.py index f24ab88..255ea0e 100644 --- a/.github/scripts/lintcommit.py +++ b/.github/scripts/lintcommit.py @@ -164,7 +164,8 @@ def lint_range(git_range: str, *, skip_dirty_check: bool = False) -> LintResult: status = subprocess.run( ["git", "status", "--porcelain"], capture_output=True, - text=True, check=False, + text=True, + check=False, ) if status.stdout.strip(): return LintResult( @@ -178,7 +179,8 @@ def lint_range(git_range: str, *, skip_dirty_check: bool = False) -> LintResult: result = subprocess.run( ["git", "log", "--no-merges", git_range, "-z", "--format=%H%n%B"], capture_output=True, - text=True, check=False, + text=True, + check=False, ) if result.returncode != 0: return LintResult(git_error=result.stderr.strip()) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e47a2b..2e4f299 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,6 +7,7 @@ permissions: on: push: + branches: [ main ] pull_request: branches: [ main ]