Repository navigation
feat(smithery): add gitlabPermissionMode config option - #820
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📜 Recent review details
📝 Summary
Merge Risk: ⚪ Minimal · up to The new option reaches the application as configured, while the existing explicit read-only setting retains its tested behavior. No material merge-blocking risk remains; the change is ready for normal checks. Pre-merge checks |
|
zereight
left a comment
There was a problem hiding this comment.
Verdict
APPROVE. No serious issues.
gitlabPermissionMode is on both schemas and in commandFunction:
...(config.gitlabPermissionMode ? { GITLAB_PERMISSION_MODE: config.gitlabPermissionMode } : {}),The enum is readonly | modify | full, same as GitLabPermissionMode. Leaving it unset does not set the env var, so the server stays at its default full.
Checked, not a defect: GITLAB_READ_ONLY_MODE=true still wins in config.ts and forces readonly. That is the existing server rule. Setting gitlabPermissionMode does not clear a gitlabReadOnlyMode: true that is still on.
Docs mismatch and tests were skipped for this pass.
…ion-mode Keep gitlabReadOnlyMode without a default and with the deprecated description, and pass gitlabPermissionMode as GITLAB_PERMISSION_MODE only when it is set. Co-authored-by: Cursor <cursoragent@cursor.com>
Why
Follow-up to #814, which left the Smithery config out.
GITLAB_READ_ONLY_MODEis deprecated and will be removed in v3.0.0 (#815). Its replacement isGITLAB_PERMISSION_MODE, but Smithery users had no way to set it, so they could only use the deprecatedgitlabReadOnlyModeoption. This PR adds the replacement.Changes
smithery.yamlonly (+9 lines, nothing removed):gitlabPermissionModeproperty in bothconfigSchemaandstartCommand.configSchema:type: string,enum: [readonly, modify, full](the valuesconfig.tsaccepts), no default. If unset, the server default (full) applies.commandFunctionpasses it asGITLAB_PERMISSION_MODEonly when it is set.gitlabReadOnlyMode, are unchanged. docs: include core in deprecated env replacements and mark deprecated settings #814 edits their descriptions, and this PR stays out of those lines to avoid conflicts.User impact
Additive. Existing Smithery configs behave the same. Smithery users can now pick
readonly,modifyorfullinstead of the deprecatedgitlabReadOnlyMode.Note:
gitlabReadOnlyModestill hasdefault: false, so Smithery may always sendGITLAB_READ_ONLY_MODE=false. After #816, that shows a deprecation warning on stderr. Permissions are not affected, because onlytrueoverridesGITLAB_PERMISSION_MODE. This PR does not change that. It can be handled separately or when the field is removed in v3.0.0.Tests
npm ci,npm run build: passnpm run test:schema: pass (schema 121, toJSONSchema 7, node:test 33)npx tsc --noEmit: passnpm run check:skill-sync: passsmithery.yaml, so nothing was regenerated.smithery.yamlwithjs-yamland evaluatedcommandFunction:readonly/modify/full→GITLAB_PERMISSION_MODEset to that valueGITLAB_PERMISSION_MODEin envtype=string,enum=[readonly, modify, full], no default