Skip to content

CI does not run when a pull request is retargeted to main #4181

Closed

Description

@Astro-Han

What happened

The required CI / test check is not triggered when a pull request is synchronized while targeting another branch and is then retargeted to main.

The CI workflow filters pull requests with branches: [main] but uses the default pull_request activity types. A base-branch change emits an edited event, while the default activity types are only opened, synchronize, and reopened.

PR #4161 demonstrated the gap:

  • Its head was force-pushed while the base was still fix/peer-mesh-cleanup.
  • Six seconds later, the base was changed to main.
  • No automatic CI run was created for that revision.
  • A later force-push emitted synchronize and immediately triggered the expected pull-request workflows.

Expected: retargeting an eligible pull request to main produces the required test check for the current revision.

How to reproduce

  1. Open a pull request targeting a branch other than main.
  2. Push or force-push its head.
  3. Retarget the pull request to main.
  4. Observe that no CI / test run is created for the current pull request revision.
  5. Push or rebase the branch again.
  6. Observe that the resulting synchronize event triggers CI.

Environment

Logs, screenshots, or additional context

The current workaround is to push or rebase the branch again after retargeting it.

A naive types: [opened, synchronize, reopened, edited] change would also start the workflow for unrelated title or body edits. With the current pull-request concurrency group, such an edit could cancel an in-progress valid run. The fix should therefore ensure that unrelated edits do not run, cancel, or satisfy the required check.

The existing CI / test check should remain the single authority; the fix should not introduce a parallel workflow or required check.

The later force-push triggered the expected run: https://github.com/apache/maka/actions/runs/33255615336


Filed with AI assistance (OpenAI Codex): the agent inspected the pull-request timeline, workflow configuration, and exact workflow runs; the human contributor reviewed this report before filing.

Activity

  1. added
    bug
    on Aug 29, 2026
  2. added theissue type on Aug 29, 2026
  3. added
    help wanted
    on Aug 29, 2026
  4. jackeyfaker77 commented on Aug 29, 2026

    @jackeyfaker77
    Contributor

    take

  5. jackeyfaker77 commented on Aug 29, 2026

    @jackeyfaker77
    Contributor

    I'd like to work on this. I plan to update the existing CI workflow so that retargeting a pull request to main triggers the required CI / test check, while unrelated edits such as title or body changes do not run or cancel CI and do not satisfy the required check. I will also add focused regression coverage for the trigger and concurrency behavior.

  6. added a commit that references this issue on Sep 12, 2026
    83aa12a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bughelp wanted

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions