-
Notifications
You must be signed in to change notification settings - Fork 192
feat: Add support for tags in deployment branch policies #796
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
Conversation
Hey @decyjphr. Can I ask for review please? |
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.
Pull Request Overview
This PR adds support for the 'tag' type in deployment branch policies for environments, updates unit tests to cover the new functionality, and revises the documentation accordingly.
- Adjust unit tests to validate both branch and tag policies.
- Update the logic in the environments plugin to correctly transform custom branch policies.
- Revise documentation to reflect the new policy types and updated schema.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
File | Description |
---|---|
test/unit/lib/plugins/environments.test.js | Updated tests for policy naming changes and added 'tag' policy support. |
lib/plugins/environments.js | Modified processing and sorting of custom branch policies to include policy type. |
docs/github-settings/6. deployment-environments.md | Updated examples and descriptions to reflect custom branch policies as arrays of policy objects. |
Comments suppressed due to low confidence (1)
docs/github-settings/6. deployment-environments.md:137
- The documentation states that custom_branch_policies is a 'boolean or object', but the examples and code indicate it should be an array of policy objects. Please update the documentation to accurately reflect that custom_branch_policies must be an array.
<p> <code>custom_branch_policies</code><span style="color:gray;"> <i>boolean or object</i> </span></p>
Tip: Copilot code review supports C#, Go, Java, JavaScript, Markdown, Python, Ruby and TypeScript, with more languages coming soon. Learn more
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.
This will cause any settings that use the old way of declaring custom branch policies
to break, right. But I think this is necessary to add support for tag type.
So the question is can we still support array of strings and assume those would be converts to branch
type policy.
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.
Thanks!
@decyjphr this looks great, I'm keen to use the functionality. Do you know when this will get released? Thank you. |
@martinjackson-itv I am still in the middle of testing all the PRs that have been merged and it's taking longer but I hope to release in a few days. |
tag
type in environments' deployment branch policies - see https://docs.github.com/en/rest/deployments/branch-policies?apiVersion=2022-11-28#create-a-deployment-branch-policy