# New Release Branch

> Create a new release branch for Memgraph documentation with the initial release-notes scaffold commit and PR. Use when the user wants to start a new release, create a release branch, or prepare release notes for a new version.

- Skill: `memgraph/new-release-branch` (Agent Skill)
- Install (CLI): `npx skillmds@latest add memgraph/new-release-branch`
- Raw SKILL.md: https://api.skillmd.com/api/skills/memgraph/new-release-branch/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Docs & Writing
- Author: memgraph (https://skillmd.com/u/memgraph)
- Updated: 2026-09-17
- Page: https://skillmd.com/skills/memgraph/new-release-branch

---


# New Release Branch

Automates the first commit of a new Memgraph documentation release branch:
creates the branch, scaffolds the release-notes titles, and opens a PR.

## Step 1 — Gather information

Ask the user (use `AskQuestion` if available, otherwise ask conversationally):

1. **Branch name** — exact name, e.g. `release/3.9`.
2. **Memgraph version + date** — e.g. `v3.9.0 - March 25th, 2026`.
3. **Lab version + date** — e.g. `v3.9.0 - March 25th, 2026`.
4. **GitHub milestone URL** — for the PR description, e.g.
   `https://github.com/memgraph/memgraph/milestone/44`.

## Step 2 — Create the branch

```bash
cd <documentation-repo-root>
git checkout main && git pull
git checkout -b <branch-name>
```

## Step 3 — Edit `pages/release-notes.mdx`

The file has this high-level structure:

```
## 🚀 Latest release

### Memgraph <previous_version> - <previous_date>
...content...

### Lab <previous_lab_version> - <previous_lab_date>

<LabReleasesClient version="<prev_lab_ver>" />

## Previous releases

### Memgraph <older_version> ...
```

Make **two** changes (use `StrReplace` or equivalent):

### 3a — Add new empty titles above the current latest

Insert immediately after the line `## 🚀 Latest release`:

```
### Memgraph <new_version> - <new_date>

### Lab <new_lab_version> - <new_lab_date>

<LabReleasesClient version="<new_lab_ver>" />
```

### 3b — Move previous latest Memgraph + Lab into "Previous releases"

Take the **entire previous latest block** — from the old
`### Memgraph <prev_version>` heading through the old
`### Lab <prev_lab_version>` + its `<LabReleasesClient ... />` line — and
move it so it appears right after the `## Previous releases` heading (before
whatever was previously the first entry there).

The result should look like:

```
## 🚀 Latest release

### Memgraph <new_version> - <new_date>

### Lab <new_lab_version> - <new_lab_date>

<LabReleasesClient version="<new_lab_ver>" />

## Previous releases

### Memgraph <prev_version> - <prev_date>
...all previous content...

### Lab <prev_lab_version> - <prev_lab_date>

<LabReleasesClient version="<prev_lab_ver>" />

### Memgraph <older_version> ...
```

**Important:** If there are multiple Memgraph patch releases under Latest
(e.g. v3.8.1 and v3.8.0), move *all* of them together with the Lab entry.

**Implementation tip:** Do both changes in one `StrReplace` call by matching
from `## 🚀 Latest release` through `## Previous releases` and rewriting the
entire block at once. This avoids error-prone multi-step edits where
`## Previous releases` can end up in the wrong place.

## Step 4 — Commit and push

```bash
git add pages/release-notes.mdx
git commit -m "Add Memgraph <new_version> and Lab <new_lab_version> release note titles"
git push -u origin <branch-name>
```

## Step 5 — Create the PR

Use `gh pr create`. The title should be:

```
Memgraph <new_version>
```

Use this exact body template (fill in the placeholders):

~~~
Make sure to do:
* [ ] update sitemap
* [ ] update direct download links

Milestones
* Memgraph -> <milestone_url>

### Docs Integration Tracking

#### Breaking changes PRs

- [ ] https://github.com/memgraph/memgraph/pull/NNNN — short title @author

#### Docs needed (Memgraph PR → Docs PR)

- [ ] https://github.com/memgraph/memgraph/pull/NNNN → https://github.com/memgraph/documentation/pull/MMMM @author
- [ ] https://github.com/memgraph/memgraph/pull/NNNN → no doc PR yet @author

#### Changelog (all PRs requiring a changelog entry)

- [ ] https://github.com/memgraph/memgraph/pull/NNNN @author
~~~

Replace `<milestone_url>` with the actual URL provided by the user.
The `NNNN` / `MMMM` / `@author` / `short title` placeholders are filled in manually
as PRs are merged — remove the example lines and replace them with real entries.
Rules for each section:
- **Breaking changes PRs** — one line per merged PR carrying the `breaking` label.
- **Docs needed** — one line per merged PR labeled `Docs needed`; end with the doc PR link
  (or `no doc PR yet`) and the code PR author's `@handle`. Tick `[x]` once the doc PR is merged.
- **Changelog** — one line per merged PR labeled `Docs needed` **or** `Docs - changelog only`;
  end with the author's `@handle`. This section deliberately duplicates `Docs needed` entries —
  it tracks the changelog entry independently of the doc page. Tick `[x]` once the entry lands
  in `release-notes.mdx`.

## Step 6 — Update the milestone description

Add a `DOCS ->` link back to the documentation PR in the GitHub milestone
description. Extract the milestone number from the milestone URL
(e.g. `49` from `https://github.com/memgraph/memgraph/milestone/49`) and the
PR number from the PR URL created in Step 5.

```bash
gh api repos/memgraph/memgraph/milestones/<milestone_number> \
  --method PATCH \
  -f description='DOCS -> https://github.com/memgraph/documentation/pull/<pr_number>'
```

## Step 7 — Report back

Print the PR URL and remind the user to:
- Fill in the PR/author placeholders in the PR description.
- Update the sitemap and direct download links before merging.

