Getting started
Concepts
Learn the terms that Patchbay uses and how workspaces, projects, components and releases fit together.
On this page
Patchbay uses a small set of terms, and this page explains each one before it follows an example product from its first release to version 1.0.0.
Workspaces and projects
A workspace holds the work of a person or a team. When you sign up, you create a personal workspace, and you can also create a shared workspace and invite members to it.
A project is one product that you release, and the workspace owns it. Each project is Private or Public. Every member of the workspace can read a public project, but nobody outside the workspace can. A private project is visible only to workspace owners and administrators and to people with a project grant. Project access and roles explains how access works.
Components
A component is one part of a project, and it points to one repository and one root path in that repository. The root path is / for a whole repository, or a folder such as /apps/api in a monorepo.
When Patchbay compares two releases, it reads only the commits that changed the root path of each component. So several components can share one monorepo and still get separate lists of commits and pull requests.
Releases, versions and version cycles
A release lists one entry for each component, and each entry names a commit and the branch or tag that it came from.
A version is a semantic version of the project, such as 1.4.0. The version cycle of 1.4.0 holds every candidate for that version and, at the end, its promoted release.
Candidates and the open candidate
A candidate is one attempt at a version, and Patchbay numbers candidates in order, for example 1.4.0 / rc.1 and 1.4.0 / rc.2.
A version cycle has at most one open candidate, which is the only candidate that can change. When you start a new candidate, it starts from the branches and commits of the previous one, and the previous candidate becomes read-only. If you restore a read-only candidate, Patchbay creates a new candidate from it.
Promoted releases
When you promote a candidate, Patchbay creates the promoted release of the version and closes the other candidates of that version. A promoted release never changes. Promote a release explains the steps.
Tracked and pinned refs
Each entry of a release has a ref, which is either tracked or pinned. A tracked ref is a branch or a tag, so it can move to a new commit. A pinned ref is a commit SHA, and it cannot move.
Only an open candidate follows a tracked ref. If the GitHub App can read the repository, the open candidate moves to the new commit when the branch or tag moves. Every entry of a promoted release is pinned.
Genesis and the baseline
Genesis is the first release of a project, and it records the starting commit of each component. Because it has nothing to compare with, every component in Genesis shows as added.
The baseline of a version cycle is the latest promoted release of the project when the cycle started. Patchbay compares each candidate with this baseline, which stays the same for the whole cycle.
Release diffs
A release diff compares two releases and has one row for each component. Each row has one of four states: added, removed, updated or unchanged. For an updated component, Patchbay lists the commits and pull requests between the two commits. Compare releases shows how to read a release diff.
When a pull request targets the branch of an open candidate but is not in the candidate yet, it is a pending pull request.
Catalog files
A catalog file is a patchbay.yaml file at the root of the default branch of a repository, and it declares the components of one project. Patchbay adds and refreshes those components, but it never moves, renames or deletes a component. The catalog file reference gives the format.
An example
In this example, the workspace acme ships a product called storefront, built from two folders of one monorepo and a worker that lives in its own repository.
| Component | Repository | Root path |
|---|---|---|
web | acme/storefront | /apps/web |
api | acme/storefront | /apps/api |
worker | acme/worker | / |
- The team creates the project
storefrontand completes Genesis, which records the current commit of each component. - The team starts version
1.0.0, whose baseline is Genesis. The open candidaterc.1tracks themainbranch of each component. - Developers merge pull requests into
maininacme/storefront, and the open candidate moves to the new commits. The release diff showswebandapias updated andworkeras unchanged. - The team starts
rc.2with a fix, andrc.1becomes read-only. - A release manager promotes
rc.2. Patchbay pins all three components and creates the promoted release1.0.0. - Version
1.1.0starts later, with1.0.0as its baseline.