Skip to content

Enable setting the base for a PR using labels#5121

Merged
connorjward merged 3 commits into
releasefrom
connorjward/ci-base-ref
May 18, 2026
Merged

Enable setting the base for a PR using labels#5121
connorjward merged 3 commits into
releasefrom
connorjward/ci-base-ref

Conversation

@connorjward
Copy link
Copy Markdown
Contributor

@connorjward connorjward commented May 18, 2026

This PR lets us set the base branch to main or release (and therefore use a dev/release build) using labels. This is useful for cases where you have dependent PRs and therefore the base branch may not be main or release.

Helpful for multi-PR changes.
@connorjward connorjward added base:main Run this PR using a main (dev) build base:release Run this PR using a release build and removed base:main Run this PR using a main (dev) build labels May 18, 2026
@connorjward connorjward removed the base:release Run this PR using a release build label May 18, 2026
@connorjward connorjward changed the base branch from connorjward/release-copy to release May 18, 2026 10:44
@connorjward connorjward marked this pull request as ready for review May 18, 2026 10:45
@connorjward connorjward requested a review from JHopeCollins May 18, 2026 10:45
Comment thread .github/workflows/pr.yml
on:
pull_request:
types: [ opened, synchronize, reopened, labeled ]
types: [ opened, synchronize, reopened, labeled, unlabeled ]
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need this now but we didn't before?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I want the workflow to be triggered whenever the labels change, not just when a new label is added. I ran into this because I was switching out the labels to test this and found that it wasn't being rerun as expected.

@JHopeCollins
Copy link
Copy Markdown
Member

Just to check that I understand. Is this for the case where I have this branch structure:

base -----------------> base
    \                  /
     branch1 -> branch2

and I have a PR to merge branch1 into branch2?

Currently we look at the target branch to determine whether to build firedrake using release or main process, but if the target is branch2 then we're stumped.
After this PR I will be able to use a label to say "I know my target is branch2 but this PR is branched from/will eventually end up in release (or main) so use the corresponding build process in CI".

Is that correct?

@connorjward
Copy link
Copy Markdown
Contributor Author

Just to check that I understand. Is this for the case where I have this branch structure:

base -----------------> base
    \                  /
     branch1 -> branch2

and I have a PR to merge branch1 into branch2?

Currently we look at the target branch to determine whether to build firedrake using release or main process, but if the target is branch2 then we're stumped. After this PR I will be able to use a label to say "I know my target is branch2 but this PR is branched from/will eventually end up in release (or main) so use the corresponding build process in CI".

Is that correct?

Yep spot on.

@connorjward connorjward merged commit ba152cf into release May 18, 2026
14 of 16 checks passed
@connorjward connorjward deleted the connorjward/ci-base-ref branch May 18, 2026 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants