Skip to content
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

feature: support to "include" additional policy.yml or ".d/" approach #906

Open
seanorama opened this issue Jan 29, 2025 · 1 comment
Open

Comments

@seanorama
Copy link

Our policy files are very large, with large sections generated based on the file paths and github teams in a repo.

To make this management easier, we'd like to be able to split the .policy.yml into multiple files. This could be done by supporting an "include" statement, or with a .d/ directory inclusion approach.

@bluekeyes
Copy link
Member

Thanks for the suggestion. Beyond making the files smaller, can you share some examples of how management would be easier for you if it was possible to split a policy in to multiple files?

Related, is there a particular way you envision inclusion working? The policy file contains both the policy section and the approval_rules section. Will the policy definition exist in the root .policy.yml file but then rules could be included from other files? Can you put any section in any file and they're merged together in some way?

There's also some performance considerations. Loading the policy is one of the most common operations (it happens on almost every webhook event), so increasing the number of GitHub requests required to read the full content could quickly add up in a high-traffic repository with many included files. We'd likely need to redesign how policy loading works to minimize API requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants