Skip to content

Commit

Permalink
Ref conditional1 (#26)
Browse files Browse the repository at this point in the history
* fix: update extra_files logic to handle empty ref cases and improve repository access safety

* fix: update default_branch output to use variable for new repositories

* terraform-docs: automated action

---------

Co-authored-by: Dave Arnold <dave@roknsound.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
3 people authored and GitHub committed Apr 12, 2025
1 parent 722f8bc commit a5856ee
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,12 @@ output "visibility" {

output "default_branch" {
description = "Default branch of the repository"
value = var.create_repo ? github_repository.repo[0].default_branch : data.github_repository.existing[0].default_branch
value = var.create_repo ? var.github_default_branch : data.github_repository.existing[0].default_branch
}

# resource "github_branch_default" "default_main_branch" {
# count = var.github_default_branch != "main" ? 1 : 0

output "topics" {
description = "List of topics applied to the repository"
value = var.create_repo ? github_repository.repo[0].topics : data.github_repository.existing[0].topics
Expand Down

0 comments on commit a5856ee

Please sign in to comment.