From 0a07e4e187a05dff8c16d9c58dfa99fcd541777a Mon Sep 17 00:00:00 2001 From: Michael Daniels Date: Sat, 7 Feb 2026 19:51:27 -0500 Subject: [PATCH] ci/github-script/lint-commits: fix development branch check https://redirect.github.com/NixOS/nixpkgs/pull/487628 should have had this job fail, but [didn't](https://github.com/NixOS/nixpkgs/actions/runs/21753302803/job/62756645701?pr=487628#step:3:18), because the head branch was named `master`. --- ci/github-script/lint-commits.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ci/github-script/lint-commits.js b/ci/github-script/lint-commits.js index 5237b41845e1..8f201ca5e4c7 100644 --- a/ci/github-script/lint-commits.js +++ b/ci/github-script/lint-commits.js @@ -32,10 +32,12 @@ async function checkCommitMessages({ github, context, core }) { if ( baseBranchType.includes('development') && - headBranchType.includes('development') + headBranchType.includes('development') && + pr.base.repo.id === pr.head.repo?.id ) { - // This matches, for example, PRs from staging-next to master, or vice versa. + // This matches, for example, PRs from NixOS:staging-next to NixOS:master, or vice versa. // Ignore them: we should only care about PRs introducing *new* commits. + // We still want to run on PRs from, e.g., Someone:master to NixOS:master, though. core.info( 'This PR is from one development branch to another. Skipping checks.', )