Concept for GitHub Organizations and Repositories
This page documents the principles for how we organize GitHub organizations (orgs) and repositories in the SAMT-BU platform – and lays the groundwork for the structure to scale to multiple projects under the SAMT umbrella.
Status: Early draft. The concept is partially implemented but not fully thought through for the scenario of multiple parallel projects. This page is updated continuously.
Core principle
We distinguish between two roles:
| Role | Responsibility | Example |
|---|---|---|
| Platform org | Publishes websites, owns theme and infrastructure | github.com/samt-x |
| Project org | Owns content for one specific project | github.com/samt-bu, github.com/samt-pb |
samt-x is the platform organization – this is where published GitHub Pages sites live, and where the shared theme and CI/CD framework are managed. Project orgs are the content owners.
Publishing via GitHub Pages
GitHub Pages publishes sites from repos in an org at <org>.github.io/<repo>. For a site to appear under samt-x.github.io/, the Hugo site repo must belong to the samt-x org:
github.com/samt-x/samt-bu-docs → samt-x.github.io/samt-bu-docs/
github.com/samt-x/samt-pb-docs → samt-x.github.io/samt-pb-docs/
Content repos (modules) can reside in any org – the Hugo Module system is org-agnostic.
Hugo Modules are org-agnostic
hugo.toml references modules using the full github.com/<org>/<repo> path. The org boundary is invisible to Hugo:
[[module.imports]]
path = "github.com/samt-pb/team-architecture"
This means content repos can be freely organized in project-specific orgs without affecting the publishing structure.
Current structure (samt-bu project)
Currently all repos reside in the samt-x org – both infrastructure and content:
| Repo | Type | Should belong to |
|---|---|---|
hugo-theme-samt-bu | Infrastructure | samt-x ✅ |
samt-bu-docs | Published site | samt-x ✅ |
team-architecture | Content | samt-x (for now) |
samt-bu-drafts | Content | samt-x (for now) |
solution-samt-bu-docs | Content | samt-x (for now) |
samt-bu-files | Attachments | samt-x (for now) |
Content repos were created in samt-x early in the project. They work fine where they are, and migration is not a priority – but it is noted that they conceptually belong in a dedicated samt-bu org.
Recommended principles going forward
samt-x= platform. Only infrastructure repos and Hugo site repos (one per published site) belong here.- New projects = new org. Create one org per project (
samt-pb,samt-pc, …) for content repos. This gives clear ownership and avoids naming clutter insamt-x. - Shared resources – loosely coupled. A repo like
team-architecturecan in principle be mounted by multiple Hugo sites (e.g., bothsamt-bu-docsandsamt-pb-docs). The Hugo Modules system supports this without modification. - Don’t migrate what works. Existing
samt-bucontent repos insamt-xare not moved unless there is a concrete reason.
Access model
Established 12 August 2026. Background and rationale in issue #69.
Access is granted to teams, never to individuals:
| Team | Members | Write on |
|---|---|---|
samt-bu-core-team | Core participants | Most project repos, including samt-bu-portfolio (from 15 November 2026). Not information-models or the legal, ArchiMate and organisation repos, which have their own owners. |
samt-bu-alle | All SAMT-BU participants | samt-bu-needs (Needs), content-insight (Insight), samt-bu-drafts, samt-bu-files (+ Read on samt-bu-docs and samt-bu-archi-models) |
samt-bu-editorial | The editorial team | samt-bu-docs (the frame: front page, About, How to contribute, section front pages), samt-bu-drafts and team-architecture |
samt-bu-archimate | ArchiMate modellers | samt-bu-archi-models, kode-archiscripts |
Subject teams (samt-bu-pilot-1…7, -architecture, -market, -information-models) | Participants in that work | Their own repo. samt-bu-information-models has both information-models and team-semantics, and samt-bu-architecture also has team-semantics. |
The SAMT-BU teams are nested under samt-bu-alle (from 23 October 2026). The core team, the editorial team and
all subject teams have samt-bu-alle as their parent. Child teams inherit the parent’s access. Anyone in a SAMT-BU team is therefore
automatically part of “alle”, however they joined. Teams for the platform and other purposes
(solution-*, content-bots, samt-x, samt-bu-partners, samt-bu-external-contributors)
are kept outside. Background in
issue #80.
No separate team for temporary core members. Anyone taking part in the core work, for a short
or long period, is added to the core team on equal terms with the others, and removed again when
the period is over. The rotating team samt-bu-core-team-rotating, intended for this, was deleted
on 24 October 2026.
One frozen repo, samt-x.github.io, has no team access, only personal grants. It is not
intended for editing in a documentation context. (hugo-theme-samt-bu was also frozen, and from
15 November 2026 has Write for the solution team solution-samt-bu-docs, which owns its PRs.)
Who handles pull requests in each repo is set out in
Conventions. (demo-repository
was also frozen, and was deleted on 2026-10-23. information-models was frozen until October 2026,
and now has Write for the subject team samt-bu-information-models.)
The subject team samt-bu-semantics was merged into samt-bu-information-models on 31 October 2026
(team-semantics#1).
samt-bu-docs is the platform and editorial frame (from 15 November 2026,
issue #82). Content with its own owner lives in
modules, where samt-bu-alle has Write. In samt-bu-docs itself only the core team and the editorial team have
Write. Other participants see “Suggest edit to this page” instead of “Edit this page” on the pages that live there.
Pilot teams do not grant access to the shared documentation. samt-bu-docs
was previously attached to the samt-bu-pilot-1 team, which gave pilot 1
participants write access the other pilots lacked. That link has been removed.
Maintenance
- New person on the project → add to their subject team or the core team. Membership of
samt-bu-allefollows from the nesting. Anyone not in a subject team is added tosamt-bu-alledirectly - New SAMT-BU team → set
samt-bu-alleas parent (Settings → Parent team) - New module repo → add it to
samt-bu-core-team - New repo → give it topics, see Conventions
Member list
GitHub knows who has access, but not who the person is or what role they have in the project. That is kept in a member list in the private repository samt-bu-intern-admin, which only the core team can access. The list is maintained manually, preferably via Claude, and holds name, email, company, status and role in SAMT-BU. Personal data is kept only there.
Organisation role, teams and permissions are not recorded by hand. A check script in the same repository fetches them from GitHub, writes them to a separate file and reports discrepancies against the list. The procedure is described in Managing members and access.
Why not an org-level base permission
The org-level base permission is a floor, not a starting point. Setting it
to write gives everyone write access to everything – and it cannot be lowered
per repo. As long as the three repos are to be kept out, this is ruled out.
The base permission is “No permission” (from 23 October 2026). It only affects
private repos, since anyone can read the public ones. Private repos can therefore
only be read by teams they are assigned to, and by the owners. With Read, every member
could read private repos such as samt-bu-intern-admin, which is for the core team only.
Background in issue #72.
Note
- Organisation owners have admin everywhere, regardless of teams. That is an access path not visible in the team structure.
erikhag1testhas a direct grant onsamt-bu-docsand is not an organisation member. The grant is that account’s only access path, and it is used for testing. It must not be removed in a cleanup of direct grants.
Open questions
- Shared team repos: Can e.g.
team-architecturebelong to one org but be mounted by sites insamt-x? Yes, technically – but ownership and access control should be clarified. Should the content be owned by the project or by the team across projects? - Naming conventions for shared repos: If a team repo is to serve multiple projects, it should not carry a project-specific prefix.
- Migration of existing repos: Is it worth moving
team-architectureetc. to asamt-buorg? This affects CI secrets, CMS config, and Hugo Module pointers. - Access control across orgs: GitHub permissions are managed per org. Within
samt-xthis is now solved by the team model above. The question only returns once content repos are actually moved to a dedicatedsamt-buorg – the team structure would then have to be mirrored in both orgs.
Platform choice: GitHub vs. GitLab
See Introduction → Choice of git and git platform for the project’s overall rationale, the trade-offs with digital sovereignty and what it would take to switch. This section describes how the choice affected the technology behind docs.samt-bu.no, and is to be reduced to that.
GitHub was chosen because it is the most widely used platform in Digdir and among partners (Altinn, the National Data Catalogue (Felles datakatalog) and most visible open source projects in the Norwegian public sector are there). It is a pragmatic choice – but not necessarily the strongest one architecturally.
Where GitLab would have been stronger
| Parameter | GitHub | GitLab |
|---|---|---|
| Digital sovereignty | ❌ Microsoft/USA, CLOUD Act | ✅ Irish company, fully self-hostable (CE) |
| Open source | ❌ Proprietary | ✅ Community Edition is open source |
| Hierarchical access control | ⚠ Org → Teams (two levels, manual) | ✅ Groups → Subgroups → Repos with inheritance |
| Server location | USA (primarily) | Europe – better response times from Norway |
GitLab’s group hierarchy would have fitted the SAMT-BU structure naturally: platform group → project subgroup → content repos, with inherited permissions at each level.
Consequence for the Cloudflare dependency
Cloudflare was introduced for two reasons:
OAuth proxy (Cloudflare Worker): GitHub OAuth requires a server-side callback – Workers solve this without a server of our own. With GitLab this would probably have been unnecessary: GitLab has a built-in OAuth provider with finer token scoping, and the OAuth flow is easier to implement without a proxy.
Cloudflare Pages (CDN/hosting): Chosen for better response times than GitHub Pages. With GitLab.com (European servers) the base response times from Norway would have been better, and GitLab Pages + GitLab CI/CD is a fully adequate alternative.
What GitLab does not solve
The parallel push problem («not a fast-forward» with simultaneous commits) is independent of platform – it is a fundamental git problem. The solution is commit batching at application level, not a change of platform.
Conclusion
GitLab would have given better sovereignty, better access control and probably eliminated the need for the Cloudflare Worker. For future, similar projects in the public sector, GitLab (preferably self-hosted) should be considered as the first choice. For SAMT-BU, migration is not relevant in the short term – but the lesson has been noted.