Skip to content

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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 15, 2025
Merged

Conversation

hugovk
Copy link
Member

@hugovk hugovk commented May 8, 2025

@hugovk hugovk added skip news infra CI, GitHub Actions, buildbots, Dependabot, etc. labels May 8, 2025
@hugovk hugovk marked this pull request as ready for review May 8, 2025 20:33
@hugovk hugovk requested a review from 1st1 as a code owner May 8, 2025 20:33
Copy link
Member

@sobolevn sobolevn left a 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()
if target_branch and head_ref:
if os.environ.get("GITHUB_EVENT_NAME", "") == "pull_request":
Copy link
Member

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 be and

Suggested change
if os.environ.get("GITHUB_EVENT_NAME", "") == "pull_request":
if (
target_branch
and head_ref
and os.environ.get("GITHUB_EVENT_NAME", "") == "pull_request"
):

Copy link
Member Author

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 that target_branch and head_ref are always be truthy, so I don't think we need to check them.

@hugovk hugovk merged commit 319acf3 into python:main May 15, 2025
48 checks passed
@hugovk hugovk deleted the 3.15-fix-ci branch May 15, 2025 13:10
@hugovk hugovk added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels May 15, 2025
@miss-islington-app
Copy link

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖

@miss-islington-app
Copy link

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 15, 2025
(cherry picked from commit 319acf3)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 15, 2025
(cherry picked from commit 319acf3)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented May 15, 2025

GH-134054 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label May 15, 2025
@bedevere-app
Copy link

bedevere-app bot commented May 15, 2025

GH-134055 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label May 15, 2025
hugovk added a commit that referenced this pull request May 15, 2025
…4055)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
hugovk added a commit that referenced this pull request May 15, 2025
…4054)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@hugovk hugovk added the needs backport to 3.12 only security fixes label May 15, 2025
@miss-islington-app
Copy link

Thanks @hugovk for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 15, 2025
(cherry picked from commit 319acf3)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
@bedevere-app
Copy link

bedevere-app bot commented May 15, 2025

GH-134057 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label May 15, 2025
hugovk added a commit that referenced this pull request May 15, 2025
…4057)

Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infra CI, GitHub Actions, buildbots, Dependabot, etc. skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants