diff --git a/scripts/src/actions/shared/get-access-summary-description.ts b/scripts/src/actions/shared/get-access-summary-description.ts index a4be7b2..fd57fbf 100644 --- a/scripts/src/actions/shared/get-access-summary-description.ts +++ b/scripts/src/actions/shared/get-access-summary-description.ts @@ -47,11 +47,16 @@ function getAccessSummaryFrom(source: State | Config): Record { } function describeAccessSummary(accessSummary: Record): string { - const lines: string[] = [] + const lines: string[] = [ + '
Access Summary', + '', + '```', + ] + const permissions = ['admin', 'maintain', 'push', 'triage', 'pull'] for (const [username, summary] of Object.entries(accessSummary)) { - lines.push(`User @${username}:`) + lines.push(`User ${username}:`) if (summary.role !== undefined) { lines.push(` - is a ${summary.role} of the organization`) } else { @@ -69,7 +74,7 @@ function describeAccessSummary(accessSummary: Record): string { if (access.type === 'collaborator') { buffer.push(` - ${repository} as a direct collaborator`) } else { - buffer.push(` - ${repository} through team @${access.team}`) + buffer.push(` - ${repository} through team ${access.team}`) } } } @@ -86,6 +91,8 @@ function describeAccessSummary(accessSummary: Record): string { } } + lines.push('```', '') + return lines.join('\n') } diff --git a/terraform/resources.tf b/terraform/resources.tf index 546755f..a1775ac 100644 --- a/terraform/resources.tf +++ b/terraform/resources.tf @@ -162,8 +162,6 @@ resource "github_branch_protection" "this" { ]) : item.index => local.resources[item.source].github_branch_protection.this[item.index] } - depends_on = [github_repository.this] - pattern = each.value.pattern repository_id = try(each.value.repository_id, github_repository.this[lower(each.value.repository)].node_id) @@ -239,7 +237,7 @@ resource "github_team_repository" "this" { ]) : item.index => local.resources[item.source].github_team_repository.this[item.index] } - depends_on = [github_team.this, github_repository.this] + depends_on = [github_repository.this] repository = each.value.repository permission = each.value.permission @@ -261,8 +259,6 @@ resource "github_team_membership" "this" { ] : item.index => local.resources[item.source].github_team_membership.this[item.index] } - depends_on = [github_team.this] - username = each.value.username role = each.value.role @@ -292,8 +288,6 @@ resource "github_repository_file" "this" { ]) : item.index => local.resources[item.source].github_repository_file.this[item.index] } - depends_on = [github_repository.this] - repository = each.value.repository file = each.value.file content = each.value.content