Skip to content

feat: Git configure edit modal#1017

Open
dennisvankekem wants to merge 2 commits into
mainfrom
APL-1945
Open

feat: Git configure edit modal#1017
dennisvankekem wants to merge 2 commits into
mainfrom
APL-1945

Conversation

@dennisvankekem

@dennisvankekem dennisvankekem commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds a GET /v2/git endpoint and supporting plumbing to let the console’s “Git configure edit” modal prefill existing Git configuration values from the API.

Changes:

  • Extends SettingsInfo.otomi.git to include username, password, and email.
  • Adds OtomiStack.getGitSettings() and a new GET /v2/git operation handler.
  • Updates OpenAPI routes and ACL for AplGit to allow non-platform roles to read Git settings.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/otomi-stack.ts Adds git fields into getSettingsInfo() projection and introduces getGitSettings() helper.
src/api/v2/git.ts Adds the GET /v2/git handler that returns current git settings.
src/openapi/api.yaml Defines GET /v2/git in the API spec.
src/openapi/settingsinfo.yaml Documents additional otomi.git fields in SettingsInfo.
src/openapi/git.yaml Adjusts ACL so team roles can read AplGit.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/otomi-stack.ts
Comment on lines 373 to +377
'git.repoUrl',
'git.branch',
'git.username',
'git.password',
'git.email',

@merll merll Jun 18, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I certainly think so, too. The password should never be there to read. Even if it may be encrypted there is no reason to send it back to the client at all.

Comment thread src/otomi-stack.ts
Comment on lines +666 to +683
async getGitSettings(): Promise<{
repoUrl?: string
branch?: string
username?: string
password?: string
email?: string
}> {
const settingsInfo = await this.getSettingsInfo()
const git = settingsInfo.otomi?.git

return {
repoUrl: git?.repoUrl,
branch: git?.branch,
username: git?.username,
password: git?.password,
email: git?.email,
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I agree with that. Sending back passwords, even in encrypted form, suggests that secrets are exposed. Console can just insert placeholders.

Comment thread src/api/v2/git.ts
Comment on lines +12 to +18
export const getGitSettings = async (req: OpenApiRequestExt, res: Response): Promise<void> => {
debug('getGitSettings')

const gitSettings = await req.otomi.getGitSettings()

res.json(gitSettings)
}
Comment on lines +65 to +71
password:
type: string
description: The password or personal access token used to authenticate with the Git repository.
email:
type: string
description: The email address used for Git commit author information.
format: email
Comment thread src/openapi/api.yaml
Comment on lines +2044 to +2047
content:
application/json:
schema:
$ref: '#/components/schemas/AplGit'
Comment thread src/openapi/git.yaml
- update-any
teamAdmin: []
teamMember: []
teamAdmin:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

why allowing teams to read this data?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants