Skip to content

context: opt-in pull request head ref#551

Merged
crazy-max merged 1 commit intodocker:mainfrom
crazy-max:git-pr-head-ref-optin
Jan 15, 2025
Merged

context: opt-in pull request head ref#551
crazy-max merged 1 commit intodocker:mainfrom
crazy-max:git-pr-head-ref-optin

Conversation

@crazy-max
Copy link
Copy Markdown
Member

@crazy-max crazy-max commented Jan 13, 2025

related to

Using the /head ref for pull requests by default is problematic, as it fails to capture upstream changes in the target branch. This discrepancy might lead to different outcomes in CI runs compared to those obtained when running the same workflows against the target branch after merging a PR.

With this change, users will need to set the DOCKER_DEFAULT_GIT_CONTEXT_PR_HEAD_REF=true environment variable in their workflows to opt in to tracking the HEAD of the development branch, rather than the merge branch that previews the changes after merging into the target branch.

cc @chandanpg

@crazy-max crazy-max requested a review from tonistiigi January 13, 2025 12:12
@crazy-max crazy-max force-pushed the git-pr-head-ref-optin branch 2 times, most recently from 4aa93b9 to 042dcea Compare January 13, 2025 12:17
@crazy-max crazy-max marked this pull request as ready for review January 13, 2025 12:22
@crazy-max crazy-max force-pushed the git-pr-head-ref-optin branch from 042dcea to 0f25bd7 Compare January 13, 2025 12:24
@tonistiigi
Copy link
Copy Markdown
Member

I assume this matches actions/checkout ?

@crazy-max
Copy link
Copy Markdown
Member Author

I assume this matches actions/checkout ?

Yes indeed

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
@crazy-max crazy-max force-pushed the git-pr-head-ref-optin branch from 0f25bd7 to e02b7d7 Compare January 15, 2025 09:09
@crazy-max crazy-max merged commit e46ec80 into docker:main Jan 15, 2025
@crazy-max crazy-max deleted the git-pr-head-ref-optin branch January 15, 2025 10:38
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