Skip to content

Commit 6ac4d70

Browse files
authored
chore: add placeholder to git config inputs (#694)
Shows a placeholder of default values in the parameter input box
1 parent 49a7985 commit 6ac4d70

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

registry/coder/modules/git-config/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Runs a script that updates git credentials in the workspace to match the user's
1414
module "git-config" {
1515
count = data.coder_workspace.me.start_count
1616
source = "registry.coder.com/coder/git-config/coder"
17-
version = "1.0.32"
17+
version = "1.0.33"
1818
agent_id = coder_agent.main.id
1919
}
2020
```
@@ -29,7 +29,7 @@ TODO: Add screenshot
2929
module "git-config" {
3030
count = data.coder_workspace.me.start_count
3131
source = "registry.coder.com/coder/git-config/coder"
32-
version = "1.0.32"
32+
version = "1.0.33"
3333
agent_id = coder_agent.main.id
3434
allow_email_change = true
3535
}
@@ -43,7 +43,7 @@ TODO: Add screenshot
4343
module "git-config" {
4444
count = data.coder_workspace.me.start_count
4545
source = "registry.coder.com/coder/git-config/coder"
46-
version = "1.0.32"
46+
version = "1.0.33"
4747
agent_id = coder_agent.main.id
4848
allow_username_change = false
4949
allow_email_change = false

registry/coder/modules/git-config/main.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ data "coder_parameter" "user_email" {
4444
description = "Git user.email to be used for commits. Leave empty to default to Coder user's email."
4545
display_name = "Git config user.email"
4646
mutable = true
47+
styling = jsonencode({
48+
placeholder = data.coder_workspace_owner.me.email
49+
})
4750
}
4851

4952
data "coder_parameter" "username" {
@@ -55,6 +58,9 @@ data "coder_parameter" "username" {
5558
description = "Git user.name to be used for commits. Leave empty to default to Coder user's Full Name."
5659
display_name = "Full Name for Git config"
5760
mutable = true
61+
styling = jsonencode({
62+
placeholder = coalesce(data.coder_workspace_owner.me.full_name, data.coder_workspace_owner.me.name)
63+
})
5864
}
5965

6066
resource "coder_env" "git_author_name" {

0 commit comments

Comments
 (0)