How to create collection repositories
Collections in Open Terms Archive rely on three Git repositories to hold the data:
- Declarations repository: stores the declarations that define terms to track
- Snapshots repository: stores raw snapshots of tracked documents
- Versions repository: stores processed versions of tracked documents
This guide assumes you use GitHub. For other Git platforms, adapt these steps accordingly.
Prerequisites
🔗
Before starting, ensure you have:
- A GitHub account with permissions to create repositories
- Your collection ID and name defined
- Your collection metadata prepared
Create declarations repository
🔗
Create from template
🔗
- Go to the
demo-declarations
repository - Click “Use this template” dropdown and select “Create a new repository”
- Name it
<collection_id>-declarations
(e.g. pga-declarations
) - Wait 1-2 minutes for automatic setup to complete (check
first-time-setup
action status)
Set up the “About” section:
- Click the cogwheel icon next to “About”
- Add description: “Declarations for
<collection_name>
. Maintained by <maintainer>
.” - Set website:
https://opentermsarchive.org
- Add tags:
terms-of-service
, terms-of-service-agreements
, terms-and-conditions
, open-terms-archive
- Uncheck “Releases”, “Packages” and “Deployments”
Configure features:
- In “General → Features”:
- Disable “Wikis” and “Projects”
- In “General → Pull Requests”:
- Enable only “Allow squash merging” with “Default to pull request title and commit details”
- Enable “Allow auto-merge”
- Enable “Automatically delete head branches”
- In “Branches”:
- Add branch protection for
main
- Require pull request with 1 approval
- Require status checks:
validate_modified_declarations
and validate_schema
- In “Actions”:
- Allow all actions and reusable workflows
Remove all default labels
Update content:
- Update README with collection metadata
- Update
metadata.yml
with collection metadata
Create snapshots repository
🔗
Create from template
🔗
- Go to
demo-snapshots
- Click “Use this template” and select “Create a new repository”
- Name it
<collection_id>-snapshots
- Wait for automatic setup to complete
Set up “About” section:
- Add description: “Documents snapshots for
<collection_name>
. Maintained by <maintainer>
.” - Set website:
https://opentermsarchive.org
- Add standard tags
- Uncheck “Releases”, “Packages” and “Deployments”
Configure features:
- Disable Wikis, Issues, Discussions, and Projects
- Disable GitHub Actions
Create versions repository
🔗
Create from template
🔗
- Go to
demo-versions
- Click “Use this template” and select “Create a new repository”
- Name it
<collection_id>-versions
- Wait for automatic setup to complete
Set up “About” section:
- Add description: “Terms versions for
<collection_name>
. Maintained by <maintainer>
.” - Set website to terms navigation documentation
- Add standard tags
- Uncheck “Packages” and “Deployments”
Configure features:
- Disable Wikis, Issues, Discussions, and Projects
- Disable GitHub Actions
Update README with collection metadata
Set up GitHub teams
🔗
For collections within the Open Terms Archive organization:
- Create a new collection team
- Configure team:
- Name it after the collection
- Set collection icon as avatar
- Description: “Maintainers of the
<collection_name>
collection”
- Set repository access:
- Declarations repository: “Maintain” access
- Snapshots repository: “Triage” access
- Versions repository: “Triage” access
- Add team members
- Add repositories to Bots team with “Write” access