Aller au contenu

Branches, commits and releases

Ce contenu n’est pas encore disponible dans votre langue.

The repository has two long-lived branches:

  • dev, the default branch: the next release is prepared there. New features and most fixes go to dev.
  • main: what is released. The packages and the Docker images are published from main, and so is this documentation.
Your changeStart fromMerge request to
A feature, a fix that can wait for the next releasedevdev
A fix that cannot wait (hotfix)mainmain, then main is merged back into dev
Documentation of what is already releasedmainmain, then main is merged back into dev
Documentation of a feature that is not released yetdev, in the feature’s branchdev, with the feature

Write documentation explains why a documentation change can start from main.

Name your branch after the merge request, in lowercase words separated by hyphens: workspace-report-pdf, or fix-… for a bug fix: fix-datalink-created-by.

Before you open the merge request, update your branch with its target branch, and write a description that gives the context and the reason for the change.

Commit messages follow gitmoji with a scope, then a short subject in the imperative:

<emoji>(<scope>) <subject>
<body>
<footer>

For example:

✨(client) download a dated report of the workspace as a PDF
🐛(api) set the creator of a datalink created through the API
📝(doc) describe the management commands
  • Scope: the part of the project concerned, for example api, client, app (API and client together), ci, deploy, dependencies, doc. Leave it out, with its parentheses, when the change concerns the whole project.
  • Subject: in the imperative and the present tense: “add”, not “added” nor “adds”.
  • Body: why the change is needed, and what it changes compared with the previous behaviour.
  • Footer: the issues closed by the change, one per line, for example Closes #234, and the Assisted-by: AI line when an AI assistant helped you.

A commit made with the help of an AI assistant ends with this line, written exactly this way, after a blank line, so that git reads it as a trailer:

✨(client) group and filter the metadata of an object by source
The metadata tab lists every field in one flat list, whatever madbot or plugin
it comes from. Two buttons next to the search now group and filter the fields
by source.
Assisted-by: AI

git commit --trailer "Assisted-by: AI" adds it for you, and git log --grep="^Assisted-by: AI$" lists the assisted commits. The author and the committer stay the person who made the commit, with their own name and email. Since merge requests are merged with squash, the description of a merge request that contains assisted commits ends with the same line. The AI policy gives the rules.

The API (api/), the client (client/) and plugins_api (plugin_api/) are published separately, each with its own version and changelog. When commits reach main, semantic-release looks at the commits that touched each package since its last version, and the emoji of each commit decides the next version:

EmojiRelease
💥 breaking changemajor (2.0.0 → 3.0.0)
✨ new featureminor (2.0.0 → 2.1.0)
🐛 bug fix, 🚑 critical hotfix, 🔒 security fixpatch (2.0.0 → 2.0.1)
any other emojino new version

For each new version, the CI then:

  • updates the version and the changelog of the package, and commits them to main;
  • publishes the package to the GitLab package registry;
  • builds and pushes the Docker image of the API or of the client.

The documentation/ folder is not a package: it has no version, and it is published on every merge into main.