Label the release merge request¶
Goal: have every release merge request carry labels, so a forge's list separates it from feature work and dependency updates.
Colophon asks for release and colophon when it opens a release merge
request. It never creates a label, so until they exist the request opens
without them and propose says so:
labels not applied: … "release", "colophon" matched no label on the project and was NOT sent …
create "release", "colophon" once on the group, which covers every project in it, or on this project, and the next release MR carries them: …
Create them once, as below. Labels are set only when a merge request is opened, so one already open keeps what it has, and the next one carries them.
Create them¶
GitLab¶
On the group, once, and every project beneath it can use them: the group's Manage → Labels → New label, or the API:
glab api -X POST groups/<group>/labels -f name=release -f color='#1f75cb'
glab api -X POST groups/<group>/labels -f name=colophon -f color='#6e49cb'
A project outside a group, or one that wants its own, takes the same call on
projects/<url-encoded path>/labels.
GitHub¶
GitHub has no organisation labels, so each repository needs its own:
gh label create release --repo <owner>/<repo> --color 1f75cb
gh label create colophon --repo <owner>/<repo> --color 6e49cb
On GitHub the labels are attached in a second request after the pull request is
opened, which needs the token to have issues: write.
Gitea and Forgejo, including Codeberg¶
On the organisation (Settings → Labels), which covers its repositories, or on a repository (Issues → Labels). Through the API:
curl -X POST "https://<host>/api/v1/orgs/<org>/labels" \
-H "Authorization: token $GITEA_TOKEN" -H "Content-Type: application/json" \
-d '{"name": "release", "color": "#1f75cb"}'
Bitbucket Cloud¶
Bitbucket Cloud has no labels, so colophon asks for none there.
Choose your own¶
Name the set in .colophon.yaml. A list replaces the defaults:
To ask for none, labels: []. Every label named must exist on the forge, as
above.
What not to label with¶
A label is set once, when the request opens, and colophon keeps the same request open across many runs. So a label that describes the release's current state (its bump size, which components it carries, whether it is held) would be right when the request opened and wrong a run later. Pick labels that say what the request is.
See also¶
propose.labelsin the manifest referencecolophon propose