Skip to content

Commit 2a56217

Browse files
committed
feat: add repository metadata
1 parent dd8ff01 commit 2a56217

File tree

3 files changed

+15
-0
lines changed

3 files changed

+15
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ GitHub organization managed as code.
55
## Features
66

77
- **Automated GitHub Organization management** - Define repositories using simple YAML file.
8+
- **Repository metadata** - Define description, homepage URL, topics.
89
- **Reusable GitOps Workflow** - Manage configurations using pull requests and automate updates using GitHub Actions.
910
- **Terraform** - Uses Terraform under the hood to apply changes efficiently.
1011
- **Terraform State Management** - Stores Terraform state securely in AWS S3.
@@ -106,6 +107,10 @@ Create the configuration file:
106107
---
107108
repositories:
108109
- name: repo-slug
110+
description: "The repository description." # OPTIONAL, DEFAULT none
111+
homepage_url: https://example.com/ # OPTIONAL, DEFAULT none
112+
topics: # OPTIONAL, DEFAULT none
113+
- some-topic
109114
```
110115

111116
Set it as source of truth:

terraform/main.tf

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,9 @@ resource "github_repository" "this" {
66
for_each = { for repository in local.config.repositories : repository.name => repository }
77

88
name = each.value.name
9+
10+
# Metadata
11+
description = try(each.value.description, null)
12+
homepage_url = try(each.value.homepage_url, null)
13+
topics = try(each.value.topics, null)
914
}

test.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
---
22
repositories:
33
- name: .github
4+
description: "BruzIT Test organization profile and management."
5+
topics:
6+
- github-organization-profile
7+
- github-profile
8+
- github-profile-readme

0 commit comments

Comments
 (0)