Repository navigation
Allow "warning" type protected ranges - #1439
Merged
Merged
Conversation
lavigne958
approved these changes
Mar 15, 2024
lavigne958
left a comment
Collaborator
There was a problem hiding this comment.
Great change ! Oddly enough the API allows a user to set a protected range with no editors (when providing an actual empty list of editors). 🤔
Collaborator
Author
|
yes I wasn't sure what email to put in the test, since it would be different for whoever ran the test. maybe the email is fetchable from an API somewhere? |
Collaborator
I don't think it's a problem. Leaving it like this endures it works with no emails too 🙄 |
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.
closes #1437
They were not allowed before because:
It seems that when
add_protected_rangewas added it was assumed thateditor_users_emailswas always required. However, warning ranges do not require (and in fact, cannot contain) emails.To fix this issue, we:
editor_users_emailsfrom andargumentto akeyword argument(if it is not changed in position, it should still be usable as an argument)warning_onlyis set