Skip to content

Commit

Permalink
feat: initialize vscode on repositories (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
HectorCastelli authored Nov 19, 2023
1 parent e5d2ef8 commit 7712688
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 18 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"files.associations": {
"**/*.json.tftpl": "json",
"**/*.md.tftpl": "markdown",
},
"cSpell.words": [
Expand Down
40 changes: 40 additions & 0 deletions modules/github-repo/files.tf
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,46 @@ resource "github_repository_file" "readme" {
commit_email = "infrastructure@powerd6.org"
overwrite_on_create = true

lifecycle {
ignore_changes = [
content,
commit_message,
commit_author,
commit_email
]
}
}

resource "github_repository_file" "vscode_settings" {
repository = github_repository.repository.name
branch = github_branch_default.default.branch
file = ".vscode/settings.json"
content = file("${path.module}/files/.vscode/settings.json.tftpl")
commit_message = "chore(vscode.settings): Initialize with template"
commit_author = "InfrastructureAsCode"
commit_email = "infrastructure@powerd6.org"
overwrite_on_create = true

lifecycle {
ignore_changes = [
content,
commit_message,
commit_author,
commit_email
]
}
}

resource "github_repository_file" "vscode_extensions" {
repository = github_repository.repository.name
branch = github_branch_default.default.branch
file = ".vscode/extensions.json"
content = file("${path.module}/files/.vscode/extensions.json.tftpl")
commit_message = "chore(vscode.extensions): Initialize with basic extensions"
commit_author = "InfrastructureAsCode"
commit_email = "infrastructure@powerd6.org"
overwrite_on_create = true

lifecycle {
ignore_changes = [
content,
Expand Down
5 changes: 5 additions & 0 deletions modules/github-repo/files/.vscode/extensions.json.tftpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recommendations": [
"streetsidesoftware.code-spell-checker"
]
}
6 changes: 6 additions & 0 deletions modules/github-repo/files/.vscode/settings.json.tftpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"cSpell.words": [
"powerd6"
],
"git.enableCommitSigning": true
}
18 changes: 0 additions & 18 deletions stages/repositories/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7712688

Please sign in to comment.