Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32.1k
gh-133410: Fix PR detection in build workflow#133671
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM, one optional nit
@@ -57,7 +57,7 @@ class Outputs: | |||
def compute_changes() -> None: | |||
target_branch, head_ref = git_refs() | |||
iftarget_branch and head_ref: | |||
ifos.environ.get("GITHUB_EVENT_NAME", "") == "pull_request": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think that this should beand
ifos.environ.get("GITHUB_EVENT_NAME","")=="pull_request": | |
if( | |
target_branch | |
andhead_ref | |
andos.environ.get("GITHUB_EVENT_NAME","")=="pull_request" | |
): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
See#133410 (comment), the original problem is thattarget_branch
andhead_ref
are always be truthy, so I don't think we need to check them.
319acf3
intopython:mainUh oh!
There was an error while loading.Please reload this page.
Thanks@hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Thanks@hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14. |
(cherry picked from commit319acf3)Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
(cherry picked from commit319acf3)Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
GH-134054 is a backport of this pull request to the3.13 branch. |
GH-134055 is a backport of this pull request to the3.14 branch. |
Thanks@hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
(cherry picked from commit319acf3)Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
GH-134057 is a backport of this pull request to the3.12 branch. |
Uh oh!
There was an error while loading.Please reload this page.
It's running on my fork:https://github.com/hugovk/cpython/actions/runs/14908903403/job/41878001194#step:6:16
And on this PR:https://github.com/python/cpython/actions/runs/14909052522/job/41878505661?pr=133671#step:6:19
Tools/build/compute-changes.py
looks at the wrong branches #133410