variable "github_organization" {
  default = "theorchard"
}

variable "environment" {
  default = "prod"
}

variable "service_name" {
  default = "github-orchardci"
}

variable "application_family" {
  default = "collaborators"
}

variable "github_repositories" {
  type = map(object({
    branch_protection_enabled        = bool
    branch_protection_enforce_admins = bool
    repo_auto_init                   = bool
    archived_repository              = bool
    github_code_owner_reviews        = bool
    description                      = string
    homepage_url                     = string
  }))
  description = "Map of repository names to their settings. The key is the name of the repository, and the value is a map of settings for that repository."
  default = {

    frontend-collaborator = {
      branch_protection_enabled        = true
      branch_protection_enforce_admins = true
      repo_auto_init                   = true
      archived_repository              = true
      github_code_owner_reviews        = false
      description                      = "Frontend Collaborator"
      homepage_url                     = "https://github.com/theorchard/frontend-collaborator"
    }

    frontend-collaborator-suite = {
      branch_protection_enabled        = true
      branch_protection_enforce_admins = true
      repo_auto_init                   = true
      archived_repository              = false
      github_code_owner_reviews        = false
      description                      = "Frontend Collaborator Suite"
      homepage_url                     = "https://github.com/theorchard/frontend-collaborator-suite"
    }

    graphql-collaborator = {
      branch_protection_enabled        = true
      branch_protection_enforce_admins = true
      repo_auto_init                   = true
      archived_repository              = false
      github_code_owner_reviews        = false
      description                      = "GraphQL Service for Collaborators"
      homepage_url                     = "https://github.com/theorchard/graphql-collaborator"
    }

    ows-collaborator = {
      branch_protection_enabled        = true
      branch_protection_enforce_admins = true
      repo_auto_init                   = true
      archived_repository              = false
      github_code_owner_reviews        = false
      description                      = "Ows Collaborator"
      homepage_url                     = "https://github.com/theorchard/ows-collaborator"
    }

    lambda-collaborator-report = {
      branch_protection_enabled        = true
      branch_protection_enforce_admins = true
      repo_auto_init                   = true
      archived_repository              = false
      github_code_owner_reviews        = false
      description                      = "Lambda Collaborator Report"
      homepage_url                     = "https://github.com/theorchard/lambda-collaborator-report"
    }
  }
}
