Fix: prevent_self_review breaks all environment creation via .asf.yaml#101
Open
andrewmusselman wants to merge 1 commit into
Open
Fix: prevent_self_review breaks all environment creation via .asf.yaml#101andrewmusselman wants to merge 1 commit into
andrewmusselman wants to merge 1 commit into
Conversation
create_environment() always passes prevent_self_review=True (the default) to PyGithub's Repository.create_environment(), but the installed PyGithub version does not support that parameter, causing a TypeError that prevents any deployment environment from being created. This patch: - Defaults prevent_self_review to None instead of True (only pass when explicitly set in .asf.yaml) - Falls back gracefully if PyGithub raises TypeError on the parameter, retrying without it
Author
|
I realized I hadn't specified the symptom in the trusted publishing workflow, which is we tag a release in git and push to github, and after ci/cd, the artifacts get sent to pypi without a maintainer approval gate. |
400Ping
approved these changes
Jun 2, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Gotten this email message on two separate repos when setting up Trusted Publishing for PyPi and merging a new version of
.asf.yamlsetting up an environmentpypi, first onapache/tooling-asfswhidand just now onapache/mahout:create_environment() always passes prevent_self_review=True (the default) to PyGithub's Repository.create_environment(), but the installed PyGithub version does not support that parameter, causing a TypeError that prevents any deployment environment from being created.
This patch: