Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions custom-properties/catalogue.json
Original file line number Diff line number Diff line change
Expand Up @@ -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},
Expand Down
21 changes: 21 additions & 0 deletions deploy/labels/bookkeeper.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions deploy/labels/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
24 changes: 24 additions & 0 deletions deploy/repositories/bookkeeper.yaml
Original file line number Diff line number Diff line change
@@ -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.
Comment thread
devantler marked this conversation as resolved.
Resolved
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
1 change: 1 addition & 0 deletions deploy/repositories/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
15 changes: 15 additions & 0 deletions deploy/repository-permissions/bookkeeper.yaml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions deploy/repository-permissions/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
45 changes: 45 additions & 0 deletions deploy/repository-properties/properties.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 16 additions & 0 deletions deploy/team-repositories/grant-admins-on-bookkeeper.yaml
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions deploy/team-repositories/grant-maintainers-on-bookkeeper.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 2 additions & 0 deletions deploy/team-repositories/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
15 changes: 8 additions & 7 deletions tests/admin-team-policy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ 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=(
"$repo_root/deploy/teams/admins.yaml"
"$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=(
Expand All @@ -52,6 +52,7 @@ repositories=(
setup-agent-skills-action
update-agent-skills-action
guard-installed-skill-edits-action
bookkeeper
ascoachingogvaner
aws
business-site
Expand Down
Loading