mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat: add support for coder_git_auth data source (#6334)
* Add git auth providers schema * Pipe git auth providers to the schema * Add git auth providers to the API * Add gitauth endpoint to query authenticated state * Add endpoint to query git state * Use BroadcastChannel to automatically authenticate with Git * Add error validation for submitting the create workspace form * Fix panic on template dry-run * Add tests for the template version Git auth endpoint * Show error if no gitauth is configured * Add gitauth to cliui * Fix unused method receiver * Fix linting errors * Fix dbauthz querier test * Fix make gen * Add JavaScript test for git auth * Fix bad error message * Fix provisionerd test race See https://github.com/coder/coder/actions/runs/4277960646/jobs/7447232814 * Fix requested changes * Add comment to CreateWorkspacePageView
This commit is contained in:
@@ -1409,3 +1409,10 @@ export const mockParameterSchema = (
|
||||
...partial,
|
||||
}
|
||||
}
|
||||
|
||||
export const MockTemplateVersionGitAuth: TypesGen.TemplateVersionGitAuth = {
|
||||
id: "github",
|
||||
type: "github",
|
||||
authenticate_url: "https://example.com/gitauth/github",
|
||||
authenticated: false,
|
||||
}
|
||||
|
||||
@@ -89,6 +89,18 @@ export const handlers = [
|
||||
)
|
||||
},
|
||||
),
|
||||
rest.get(
|
||||
"/api/v2/templateversions/:templateVersionId/rich-parameters",
|
||||
async (req, res, ctx) => {
|
||||
return res(ctx.status(200), ctx.json([]))
|
||||
},
|
||||
),
|
||||
rest.get(
|
||||
"/api/v2/templateversions/:templateVersionId/gitauth",
|
||||
async (req, res, ctx) => {
|
||||
return res(ctx.status(200), ctx.json([]))
|
||||
},
|
||||
),
|
||||
rest.get(
|
||||
"api/v2/organizations/:organizationId/templates/:templateName/versions/:templateVersionName",
|
||||
async (req, res, ctx) => {
|
||||
|
||||
Reference in New Issue
Block a user