feat!: Add Copilot content exclusion set and enterprise endpoints - #4527
feat!: Add Copilot content exclusion set and enterprise endpoints#4527Tens1des wants to merge 2 commits into
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4527 +/- ##
=======================================
Coverage 98.53% 98.53%
=======================================
Files 195 195
Lines 17848 17875 +27
=======================================
+ Hits 17587 17614 +27
Misses 261 261 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
|
||
| // CopilotOrganizationContentExclusionDetails is an alias for organization-scoped | ||
| // content exclusion rules. Prefer CopilotContentExclusionDetails for new code. | ||
| type CopilotOrganizationContentExclusionDetails = CopilotContentExclusionDetails |
There was a problem hiding this comment.
Why do we need two types representing the same thing?
Are you doing this just to prevent a breaking API change?
I'm fine with breaking (and documenting) the API change and just use the same renamed type for both.
Thoughts?
There was a problem hiding this comment.
Yes, the alias was only to avoid a breaking rename. Dropped it and kept a single CopilotContentExclusionDetails type, with a NOTE Breaking API change in the docs. Also updating the PR title to feat!:.
There was a problem hiding this comment.
Please remove the NOTE for consistency with other breaking changes. We provide info about breaking changes in a PR's description.
Remove CopilotOrganizationContentExclusionDetails alias and keep a single CopilotContentExclusionDetails type, as requested in review.
| // | ||
| // NOTE Breaking API change: renamed from CopilotOrganizationContentExclusionDetails. |
There was a problem hiding this comment.
This is not needed:
| // | |
| // NOTE Breaking API change: renamed from CopilotOrganizationContentExclusionDetails. |
| // GitHub API docs: https://docs.github.com/rest/copilot/copilot-content-exclusion-management?apiVersion=2022-11-28#set-copilot-content-exclusion-rules-for-an-organization | ||
| // | ||
| //meta:operation PUT /orgs/{org}/copilot/content_exclusion | ||
| func (s *CopilotService) SetOrganizationContentExclusionDetails(ctx context.Context, org string, body CopilotContentExclusionDetails) (*CopilotContentExclusionUpdateResponse, *Response, error) { |
There was a problem hiding this comment.
| func (s *CopilotService) SetOrganizationContentExclusionDetails(ctx context.Context, org string, body CopilotContentExclusionDetails) (*CopilotContentExclusionUpdateResponse, *Response, error) { | |
| func (s *CopilotService) SetOrganizationContentExclusionDetails(ctx context.Context, org string, body CopilotSetContentExclusionDetailsRequest) (*CopilotSetContentExclusionResponse, *Response, error) { |
BREAKING CHANGE:
CopilotOrganizationContentExclusionDetailsis nowCopilotContentExclusionDetails.Summary
Fixes #4526
Test plan
go test ./github/ -run ContentExclusion./script/fmt.shand./script/generate.shCopilotOrganizationContentExclusionDetails→CopilotContentExclusionDetails