Repository navigation
feat!: Add Copilot content exclusion set and enterprise endpoints - #4675
Merged
gmlewis merged 2 commits intoOct 26, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4675 +/- ##
=======================================
Coverage 98.63% 98.63%
=======================================
Files 201 201
Lines 18912 18943 +31
=======================================
+ Hits 18653 18684 +31
Misses 259 259 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
gmlewis
approved these changes
Oct 25, 2026
gmlewis
left a comment
Collaborator
There was a problem hiding this comment.
Thank you, @JamBalaya56562!
LGTM.
Awaiting second LGTM+Approval from any other contributor to this repo before merging.
Comment on lines
+1273
to
+1279
| func TestCopilotContentExclusionRule_Marshal(t *testing.T) { | ||
| t.Parallel() | ||
|
|
||
| testJSONMarshalOnly(t, CopilotContentExclusionRule{Path: new("/src/some-dir/kernel.rs")}, `"/src/some-dir/kernel.rs"`) | ||
| testJSONMarshalOnly(t, CopilotContentExclusionRule{IfAnyMatch: []string{"*.env"}}, `{"ifAnyMatch":["*.env"]}`) | ||
| testJSONMarshalOnly(t, CopilotContentExclusionRule{IfNoneMatch: []string{"*.go", "*.md"}}, `{"ifNoneMatch":["*.go","*.md"]}`) | ||
| } |
Contributor
There was a problem hiding this comment.
Could you please write table-driven tests?
Contributor
Author
There was a problem hiding this comment.
Done in 93f28b8 — converted to a table-driven test with subtests. Thanks!
Collaborator
|
Thank you, @Not-Dhananjay-Mishra! |
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.
BREAKING CHANGE:
CopilotOrganizationContentExclusionDetailsis renamed toCopilotContentExclusionDetails.Fixes #4526.
Closes: #4527
This takes over #4527 by @Tens1des, which has had no activity since the review on 2026-09-08. Thank you, @Tens1des, for the original implementation! #4526 is assigned to @Tens1des, so if you would like to finish #4527 yourself, I'm happy to close this one.
Changes from #4527:
NOTEabout the breaking change from the doc comment, and the set methods now takeCopilotSetContentExclusionDetailsRequestand returnCopilotSetContentExclusionResponse.anyOfa path string,{"ifAnyMatch": [...]}, or{"ifNoneMatch": [...]}, soCopilotSetContentExclusionDetailsRequestismap[string][]*CopilotContentExclusionRule, andCopilotContentExclusionRule.MarshalJSONencodes a rule withPathset as a plain string. The GET responses only contain path strings, so both GET methods returnCopilotContentExclusionDetails(map[string][]string), as @gmlewis asked in feat!: Add Copilot content exclusion set and enterprise endpoints #4527.New methods:
SetOrganizationContentExclusionDetails(PUT /orgs/{org}/copilot/content_exclusion)GetEnterpriseContentExclusionDetails(GET /enterprises/{enterprise}/copilot/content_exclusion)SetEnterpriseContentExclusionDetails(PUT /enterprises/{enterprise}/copilot/content_exclusion)