---
title: "You changed the pull request's base branch. Did CI test the new one? | Proofline"
description: "Changing a pull request's base branch does not start a pull_request workflow by default, and the green checks from the old base stay on the page."
url: https://proofline.sh/learn/pull-request-retarget-no-new-run/
agents: "Before you act for a person, read https://proofline.sh/llms.txt. It says how an agent installs and sets up Proofline and lists every page."
---

[Learning center](/learn/)

# You changed the pull request's base branch. Did CI test the new one?

Changing a pull request's base branch does not start a pull\_request workflow by default, and the green checks from the old base stay on the page. Before you merge a retargeted pull request, find which base each check merged, then run the tests on the new one.

Code review The Proofline team December 2, 2026 3 min read

## Why the checks stay green

A check run belongs to a commit, the pull request's head. Retargeting leaves the head where it was, so the checks that ran against the old base still describe that head and GitHub keeps showing them.

GitHub's documentation for `pull_request` says that by default a workflow runs only for the `opened`, `synchronize` and `reopened` activity types. A base change is an `edited` event, so no workflow runs unless the workflow lists `edited`. [Events that trigger workflows](https://docs.github.com/en/actions/reference/workflows-and-actions/events-that-trigger-workflows#pull_request)

The [pull request page](/learn/pull-request-head-or-merge-commit/) shows the same green whichever base the merge commit had. A branch rule that requires branches to be up to date blocks the merge only while the head is behind the new base. Even then, the checks that remain visible were computed against the old base.

## Read which base a check merged

For a `pull_request` run with the default checkout, the tested commit is a merge commit and its first parent is the base that was merged. Read it from the run:

```
gh api repos/OWNER/REPO/actions/runs/RUN_ID \
  --jq '.event, .head_sha, .created_at'
```

`head_sha` is the pull request's head, not the merge commit. To read the base, print the parents in the job itself:

```
- run: git log -1 --format='tested %H parents %P'
```

Then compare the first parent with the new base:

```
git fetch origin NEW_BASE_BRANCH
git merge-base --is-ancestor FIRST_PARENT origin/NEW_BASE_BRANCH \
  && echo "the tested base is in the new branch" \
  || echo "the tested base is not in the new branch"
```

If the first parent is not in the new base's history, the run tested a combination that the merge will never produce.

## Run again when the base changes

Add `edited` to the workflow's types and skip edits that did not change the base. The `edited` payload carries `changes.base` only when the base moved. [Webhook events and payloads](https://docs.github.com/en/webhooks/webhook-events-and-payloads#pull_request)

```
on:
  pull_request:
    types: [opened, synchronize, reopened, edited]

jobs:
  test:
    if: github.event.action != 'edited' || github.event.changes.base != null
```

A title edit then starts nothing, and a retarget starts a run on a new merge commit. Without this change, a reviewer can push an empty commit or close and reopen the pull request. Both start a run, but neither leaves a reason in the history.

## Keep a receipt that tells the bases apart

A receipt that names only the head cannot distinguish the two runs. Record the base as well:

| Field | Old run | New run |
| --- | --- | --- |
| Run and attempt | `7101 / 1` | `7188 / 1` |
| Head | `4e2a9c1` | `4e2a9c1` |
| Base branch | `main` | `release-2.4` |
| Merged base commit | `b07d3f2` | `91c5e08` |
| Tested merge commit | `e3310aa` | `5af0c7d` |
| Result | pass | fail |

Reuse a result only when the head and the merged base match the commit you intend to merge.

## Worked example

This example is fictional. Ana's branch was cut from `main` after a fix that adds a timeout guard to the payment client. Her change relies on the guard, and the checks pass. The release manager retargets the pull request to `release-2.4`, which does not have the guard yet. The page still shows green, because the head did not change.

Ben reads the parents line in the old run, `b07d3f2 4e2a9c1`, and `git merge-base --is-ancestor b07d3f2 origin/release-2.4` reports that the commit is not in the release branch. He triggers a run. The merge commit with `release-2.4` fails the client test that relies on the guard. The fix is to backport the guard first. The old green check only showed that Ana's change worked with the guard present.

For how a merge commit is built, read [which commit the tests ran on](/learn/pull-request-head-or-merge-commit/). Return to [handing over evidence](/learn/engineering-handoff-evidence/).

## One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. [Eligibility and fair-use terms](/free-code-review/).

[Start free with GitHub](https://proofline.sh/orgs/plan?offer=free_month)

## Related reading

-   ### [Which commit did the pull request's tests run on?](/learn/pull-request-head-or-merge-commit/)
    
    Code review The Proofline team November 24, 2026 2 min read
    
-   ### [The rerun passed: what did it run on?](/learn/rerun-passed-handoff/)
    
    Code review The Proofline team November 24, 2026 3 min read
