-
Notifications
You must be signed in to change notification settings - Fork 763
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
feat: Add file path protection to rulesets #2415
base: main
Are you sure you want to change the base?
Conversation
I have tested the changes on an account with paid features so this is now good for review. |
@kfcampbell would it be possible to get feedback on this PR please. |
@@ -101,6 +101,8 @@ The `rules` block supports the following: | |||
|
|||
* `tag_name_pattern` - (Optional) (Block List, Max: 1) Parameters to be used for the tag_name_pattern rule. This rule only applies to repositories within an enterprise, it cannot be applied to repositories owned by individuals or regular organizations. Conflicts with `branch_name_pattern` as it only applied to rulesets with target `tag`. (see [below for nested schema](#rules.tag_name_pattern)) | |||
|
|||
* `file_path_restriction` -(Optional) (Block List, Max 1) Parameters to be used for the file_path_restriction rule. When enabled restricts access to files within the repository. (See [Below for nested schema](#rules.file_path_restriction)) |
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.
* `file_path_restriction` -(Optional) (Block List, Max 1) Parameters to be used for the file_path_restriction rule. When enabled restricts access to files within the repository. (See [Below for nested schema](#rules.file_path_restriction)) | |
* `file_path_restriction` - (Optional) (Block List, Max 1) Parameters to be used for the file_path_restriction rule. When enabled restricts access to files within the repository. (See [Below for nested schema](#rules.file_path_restriction)) |
@grahamhar you might want to rebase as you have conflicts due to the GitHub SDK having been bumped to the next major version. |
Thanks for
Thanks for the review @stevehipwell I think everything is addressed now. |
@nickfloyd or @kfcampbell sorry for the direct tag. Is it possible to get a review of this PR? |
Resolves #2371
I have not been able to add tests as this feature is only available with paid plans. I will look to add tests that can be run when under an Enterprise when I am back in the office and have access to do this. Here is the doc that shows the push type rules are restricted.
Before the change?
After the change?
Pull request checklist
Does this introduce a breaking change?
Please see our docs on breaking changes to help!