diff --git a/custom-properties/catalogue.json b/custom-properties/catalogue.json index c977625d..c6bbc72d 100644 --- a/custom-properties/catalogue.json +++ b/custom-properties/catalogue.json @@ -45,6 +45,7 @@ "agent-plugins": {"type": "Marketplace", "auto_merge": true, "scan_actions": true}, "ascoachingogvaner": {"type": "Application", "auto_merge": true, "scan_actions": true}, "aws": {"type": "Infrastructure", "auto_merge": true, "scan_actions": true}, + "bookkeeper": {"type": "Application", "auto_merge": true, "scan_actions": true}, "business-site": {"type": "Application", "auto_merge": true, "scan_actions": true}, "client-orders": {"type": "Metadata", "auto_merge": false, "scan_actions": true}, "cloudflare": {"type": "Infrastructure", "auto_merge": true, "scan_actions": true}, diff --git a/deploy/labels/bookkeeper.yaml b/deploy/labels/bookkeeper.yaml new file mode 100644 index 00000000..04caec8c --- /dev/null +++ b/deploy/labels/bookkeeper.yaml @@ -0,0 +1,21 @@ +apiVersion: repo.github.m.upbound.io/v1alpha1 +kind: IssueLabels +metadata: + name: bookkeeper + annotations: + crossplane.io/external-name: bookkeeper +spec: + managementPolicies: ["Observe", "Create", "Update"] + forProvider: + repository: bookkeeper + # The shared patch supplies the canonical taxonomy; retain updater labels. + label: + - name: dependencies + color: "0366d6" + - name: github_actions + color: "000000" + - name: go + color: "16e2e2" + providerConfigRef: + kind: ProviderConfig + name: default diff --git a/deploy/labels/kustomization.yaml b/deploy/labels/kustomization.yaml index 31ef26af..34c4443f 100644 --- a/deploy/labels/kustomization.yaml +++ b/deploy/labels/kustomization.yaml @@ -26,6 +26,7 @@ resources: - setup-agent-skills-action.yaml - update-agent-skills-action.yaml - guard-installed-skill-edits-action.yaml + - bookkeeper.yaml - dot-github.yaml - monorepo.yaml - platform.yaml diff --git a/deploy/repositories/bookkeeper.yaml b/deploy/repositories/bookkeeper.yaml new file mode 100644 index 00000000..e0349adc --- /dev/null +++ b/deploy/repositories/bookkeeper.yaml @@ -0,0 +1,24 @@ +apiVersion: repo.github.m.upbound.io/v1alpha1 +kind: Repository +metadata: + name: bookkeeper + annotations: + crossplane.io/external-name: bookkeeper +spec: + managementPolicies: ["Observe", "Create", "Update"] + initProvider: + # Start from the Go starter template; the implementation lands by PR. + template: + - owner: devantler-tech + repository: go-template + includeAllBranches: false + forProvider: + name: bookkeeper + visibility: public + archived: false + description: "Deterministic bookkeeping automation for Numina, packaged with a Helm chart" + hasIssues: true + topics: ["bookkeeping", "numina", "jmap", "helm-chart", "go"] + providerConfigRef: + kind: ProviderConfig + name: default diff --git a/deploy/repositories/kustomization.yaml b/deploy/repositories/kustomization.yaml index 8c8f08fe..04d1bce9 100644 --- a/deploy/repositories/kustomization.yaml +++ b/deploy/repositories/kustomization.yaml @@ -13,6 +13,7 @@ resources: - setup-agent-skills-action.yaml - update-agent-skills-action.yaml - guard-installed-skill-edits-action.yaml + - bookkeeper.yaml # Actively managed (Observe/Create/Update). The shared policy patch below # applies to all Repository resources in this kustomization, while each file # retains its own lifecycle policy. diff --git a/deploy/repository-permissions/bookkeeper.yaml b/deploy/repository-permissions/bookkeeper.yaml new file mode 100644 index 00000000..229009c9 --- /dev/null +++ b/deploy/repository-permissions/bookkeeper.yaml @@ -0,0 +1,15 @@ +apiVersion: actions.github.m.upbound.io/v1alpha1 +kind: RepositoryPermissions +metadata: + name: bookkeeper + annotations: + crossplane.io/external-name: bookkeeper +spec: + managementPolicies: ["Observe", "Create", "Update"] + forProvider: + repository: bookkeeper + enabled: true + allowedActions: all + providerConfigRef: + kind: ProviderConfig + name: default diff --git a/deploy/repository-permissions/kustomization.yaml b/deploy/repository-permissions/kustomization.yaml index a1cd7451..31db9cd9 100644 --- a/deploy/repository-permissions/kustomization.yaml +++ b/deploy/repository-permissions/kustomization.yaml @@ -25,6 +25,7 @@ resources: - setup-agent-skills-action.yaml - update-agent-skills-action.yaml - guard-installed-skill-edits-action.yaml + - bookkeeper.yaml - dot-github.yaml - platform.yaml - ksail.yaml diff --git a/deploy/repository-properties/properties.yaml b/deploy/repository-properties/properties.yaml index d6240072..5c9a4893 100644 --- a/deploy/repository-properties/properties.yaml +++ b/deploy/repository-properties/properties.yaml @@ -183,6 +183,51 @@ spec: --- apiVersion: repo.github.m.upbound.io/v1alpha1 kind: RepositoryCustomProperty +metadata: + name: bookkeeper-type +spec: + managementPolicies: [Observe, Create, Update] + forProvider: + repository: "bookkeeper" + propertyName: Type + propertyType: single_select + propertyValue: ["Application"] + providerConfigRef: + kind: ProviderConfig + name: default +--- +apiVersion: repo.github.m.upbound.io/v1alpha1 +kind: RepositoryCustomProperty +metadata: + name: bookkeeper-enableautomerge +spec: + managementPolicies: [Observe, Create, Update] + forProvider: + repository: "bookkeeper" + propertyName: EnableAutoMerge + propertyType: true_false + propertyValue: ["true"] + providerConfigRef: + kind: ProviderConfig + name: default +--- +apiVersion: repo.github.m.upbound.io/v1alpha1 +kind: RepositoryCustomProperty +metadata: + name: bookkeeper-scangithubactions +spec: + managementPolicies: [Observe, Create, Update] + forProvider: + repository: "bookkeeper" + propertyName: ScanGitHubActions + propertyType: true_false + propertyValue: ["true"] + providerConfigRef: + kind: ProviderConfig + name: default +--- +apiVersion: repo.github.m.upbound.io/v1alpha1 +kind: RepositoryCustomProperty metadata: name: business-site-type spec: diff --git a/deploy/team-repositories/grant-admins-on-bookkeeper.yaml b/deploy/team-repositories/grant-admins-on-bookkeeper.yaml new file mode 100644 index 00000000..16b31ace --- /dev/null +++ b/deploy/team-repositories/grant-admins-on-bookkeeper.yaml @@ -0,0 +1,16 @@ +apiVersion: team.github.m.upbound.io/v1alpha1 +kind: TeamRepository +metadata: + name: admins-bookkeeper +spec: + managementPolicies: ["Observe", "Create", "Update"] + forProvider: + teamIdRef: + name: admins + policy: + resolve: Always + repository: bookkeeper + permission: admin + providerConfigRef: + kind: ProviderConfig + name: default diff --git a/deploy/team-repositories/grant-maintainers-on-bookkeeper.yaml b/deploy/team-repositories/grant-maintainers-on-bookkeeper.yaml new file mode 100644 index 00000000..6e2a3915 --- /dev/null +++ b/deploy/team-repositories/grant-maintainers-on-bookkeeper.yaml @@ -0,0 +1,16 @@ +apiVersion: team.github.m.upbound.io/v1alpha1 +kind: TeamRepository +metadata: + name: maintainers-bookkeeper +spec: + managementPolicies: ["Observe", "Create", "Update"] + forProvider: + teamIdRef: + name: maintainers + policy: + resolve: Always + repository: bookkeeper + permission: maintain + providerConfigRef: + kind: ProviderConfig + name: default diff --git a/deploy/team-repositories/kustomization.yaml b/deploy/team-repositories/kustomization.yaml index 2a8646e5..18e9038e 100644 --- a/deploy/team-repositories/kustomization.yaml +++ b/deploy/team-repositories/kustomization.yaml @@ -35,6 +35,7 @@ resources: - grant-maintainers-on-khoist.yaml - grant-maintainers-on-business-site.yaml - grant-maintainers-on-client-orders.yaml + - grant-maintainers-on-bookkeeper.yaml # Active Admins policy (one admin grant per active repository). - grant-admins-on-dot-github.yaml - grant-admins-on-agent-plugins.yaml @@ -58,3 +59,4 @@ resources: - grant-admins-on-khoist.yaml - grant-admins-on-business-site.yaml - grant-admins-on-client-orders.yaml + - grant-admins-on-bookkeeper.yaml diff --git a/tests/admin-team-policy.sh b/tests/admin-team-policy.sh index 3cbbbf4c..573d843b 100755 --- a/tests/admin-team-policy.sh +++ b/tests/admin-team-policy.sh @@ -30,9 +30,9 @@ require_fixed_count() { require_count 1 '^ name: admins$' "$production_render" require_count 1 '^ name: admins-devantler$' "$production_render" -require_count 26 '^ name: admins-' "$production_render" -require_count 25 '^ permission: admin$' "$production_render" -require_count 26 '^ name: admins$' "$production_render" +require_count 27 '^ name: admins-' "$production_render" +require_count 26 '^ permission: admin$' "$production_render" +require_count 27 '^ name: admins$' "$production_render" grant_files=("$repo_root"/deploy/team-repositories/grant-admins-on-*.yaml) policy_files=( @@ -40,10 +40,10 @@ policy_files=( "$repo_root/deploy/team-memberships/add-devantler-to-admins.yaml" "${grant_files[@]}" ) -[[ "${#grant_files[@]}" == 25 ]] || - fail "expected 25 Admins grants, got ${#grant_files[@]}" -[[ "${#policy_files[@]}" == 27 ]] || - fail "expected 27 Admins policy files, got ${#policy_files[@]}" +[[ "${#grant_files[@]}" == 26 ]] || + fail "expected 26 Admins grants, got ${#grant_files[@]}" +[[ "${#policy_files[@]}" == 28 ]] || + fail "expected 28 Admins policy files, got ${#policy_files[@]}" cat "${policy_files[@]}" >"$policy_source" repositories=( @@ -52,6 +52,7 @@ repositories=( setup-agent-skills-action update-agent-skills-action guard-installed-skill-edits-action + bookkeeper ascoachingogvaner aws business-site