Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Add Exclude field to gerrit code host connections#59739

Merged
pjlast merged 7 commits into
mainfrom
pjlast/gerrit-exclude-repositories
Jan 24, 2024
Merged

Add Exclude field to gerrit code host connections#59739
pjlast merged 7 commits into
mainfrom
pjlast/gerrit-exclude-repositories

Conversation

@pjlast

@pjlast pjlast commented Jan 22, 2024

Copy link
Copy Markdown
Contributor

Adds an exclude field to Gerrit code host connections that acts as the inverse of the projects field. Any repos in this list will never ever be added by this code host connection.

Docs update: sourcegraph/docs#53

Test plan

Added unit tests

@cla-bot cla-bot Bot added the cla-signed label Jan 22, 2024
@github-actions github-actions Bot added the team/source Tickets under the purview of Source - the one Source to graph it all label Jan 22, 2024
@pjlast pjlast marked this pull request as ready for review January 22, 2024 14:23
@pjlast pjlast requested a review from a team January 22, 2024 14:23
Comment thread schema/gerrit.schema.json Outdated
Comment on lines +41 to +48
"exclude": {
"description": "An array of project strings specifying which Gerrit projects to exclude from mirroring on Sourcegraph. If empty, no projects will be excluded. Useful when using an empty 'projects' field. Exclusion takes precedence over inclusion.",
"type": "array",
"items": { "type": "string" },
"examples": [
["name", "owner/name"],
["docs", "kubernetes/kubernetes"]
]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both GitHub and GitLab configs use objects here, to also allow excluding repos by other properties, like size, pattern, empty repos, external id, archived status etc.
We won't need that now, but will we ever want that, we might regret that we didn't make these objects now, do you think that'd be a huge hassle to add?

So proposed schema would instead be

"exclude": [{"name": "src-cli"}]

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think this is a good idea even if only for consistency

@pjlast pjlast merged commit 363c66e into main Jan 24, 2024
@pjlast pjlast deleted the pjlast/gerrit-exclude-repositories branch January 24, 2024 10:38
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla-signed team/source Tickets under the purview of Source - the one Source to graph it all

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants