Skip to content

feat: add support for gitlab_group_label and gitlab_project_label#24

Merged
xMoelletschi merged 1 commit intomasterfrom
9-add-label-support
Mar 2, 2026
Merged

feat: add support for gitlab_group_label and gitlab_project_label#24
xMoelletschi merged 1 commit intomasterfrom
9-add-label-support

Conversation

@xMoelletschi
Copy link
Copy Markdown
Owner

Summary

Closes #9

  • Add terraform code generation for gitlab_group_label and gitlab_project_label resources
  • Deduplicate inherited group labels — only the owning group (parent) gets each label, subgroups with only inherited labels are empty
  • Filter project labels to only include project-specific labels (skip inherited group labels)
  • Fix stale file detection by cleaning tmp/ directory between scan runs
  • Add comprehensive tests for label fetching (incl. dedup, pagination), import commands, and terraform writer output

Test plan

  • go build ./... passes
  • go test -race ./... passes
  • Manual test: --skip labels correctly skips label generation
  • Manual test: only root group shows owned labels, subgroups are empty

- Generate terraform code for group and project labels
- Deduplicate inherited group labels so only the owning group gets each label
- Filter project labels to only include project-specific labels
- Clean tmp directory between scan runs to prevent stale file detection
- Add tests for label fetching, deduplication, and import command generation
- Update README with label support documentation
@xMoelletschi xMoelletschi merged commit 8a79dab into master Mar 2, 2026
3 checks passed
@xMoelletschi xMoelletschi deleted the 9-add-label-support branch March 2, 2026 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add support for gitlab_group_label and gitlab_project_label

1 participant