Add exclude.readOnly and exclude.hidden to gerrit connection config#280
Conversation
WalkthroughThis update introduces enhancements to the Gerrit connection configuration by adding new options to exclude read-only and hidden projects from synchronization. The backend logic is updated to support these options by introducing a type for project states and a helper function to centralize exclusion logic. The schema and type definitions for Gerrit connection configuration are extended across multiple files to include the new Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Backend
participant Gerrit
User->>Backend: Request Gerrit repos (with config)
Backend->>Gerrit: Fetch all projects
Gerrit-->>Backend: Return list of projects
Backend->>Backend: For each project, call shouldExcludeProject
alt Project is excluded (special, read-only, hidden, or matches glob)
Backend->>Backend: Exclude project, log reason
else Project is included
Backend->>Backend: Add project to result
end
Backend-->>User: Return filtered project list
Poem
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
exclude.readOnly and exclude.hidden to gerrit connection config
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
docs/docs/connections/gerrit.mdx (2)
54-61: Clarify example JSON validity
The snippet uses//comments inside a JSON block, which isn’t valid JSON. Consider one of the following to avoid confusion:
- Remove the comments or move them into accompanying prose.
- Add a note that this is “pseudo-JSON” for illustration only.
Also double-check that the trailing comma after theprojectsarray is rendered correctly in your MDX context.
119-129: Well-defined schema—consider adding examples
The newreadOnlyandhiddenboolean properties (withdefault: false) are correctly added to the JSON schema. For better discoverability, you might:
- Add an
examplesarray for each new property underexclude.- Update the surrounding prose to call out the defaults when these flags are omitted.
This will help users understand how to enable these flags in practice.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/docs/connections/gerrit.mdx(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
^ Title ^
Summary by CodeRabbit