Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/.linkspector.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ ignorePatterns:
- pattern: "claude.ai"
- pattern: "splunk.com"
- pattern: "stackoverflow.com/questions"
- pattern: "reflectoring.io"
- pattern: "developer.hashicorp.com/terraform/language"
- pattern: "platform.openai.com"
- pattern: "api.openai.com"
Expand Down
29 changes: 25 additions & 4 deletions .github/workflows/backport.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,16 @@
# Automatically backport merged PRs to the last N release branches when the
# "backport" label is applied. Works whether the label is added before or
# after the PR is merged.
# Automatically backport merged PRs to the last 3 release branches plus all
# active ESR branches when the "backport" label is applied. Works whether the
# label is added before or after the PR is merged.
#
# ESR (Extended Support Release) versions are defined in
# scripts/lib/esr_versions.sh. It is typical for one of the latest 3 releases
# to also be an ESR; duplicates are removed automatically.
#
# Usage:
# 1. Add the "backport" label to a PR targeting main.
# 2. When the PR merges (or if already merged), the workflow detects the
# latest release/* branches and opens one cherry-pick PR per branch.
# latest release/* branches and ESR branches, then opens one cherry-pick
# PR per branch.
#
# The created backport PRs follow existing repo conventions:
# - Branch: backport/<pr>-to-<version>
Expand Down Expand Up @@ -49,6 +54,10 @@ jobs:
- name: Find latest release branches
id: find
run: |
# Source the shared ESR version list.
# shellcheck source=../../scripts/lib/esr_versions.sh
source "${GITHUB_WORKSPACE}/scripts/lib/esr_versions.sh"

# List remote release branches matching the exact release/2.X
# pattern (no suffixes like release/2.31_hotfix), sort by minor
# version descending, and take the top 3.
Expand All @@ -60,6 +69,18 @@ jobs:
| head -3
)

# Append ESR release branches that are not already in the list.
for minor in "${ESR_VERSIONS[@]}"; do
esr_branch="release/2.${minor}"
if echo "$BRANCHES" | grep -qxF "$esr_branch"; then
continue
fi
# Only add if the branch actually exists on the remote.
if git branch -r | grep -qE "^\s*origin/${esr_branch}$"; then
BRANCHES=$(printf '%s\n%s' "$BRANCHES" "$esr_branch")
fi
done

if [ -z "$BRANCHES" ]; then
echo "No release branches found."
echo "branches=[]" >> "$GITHUB_OUTPUT"
Expand Down
12 changes: 8 additions & 4 deletions docs/about/contributing/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

<div class="tabs">

To get started with Coder, the easiest way to set up the required environment is to use the provided [Nix environment](https://github.com/coder/coder/tree/main/nix).
To get started with Coder, the easiest way to set up the required environment is to use the provided [Nix environment](https://github.com/coder/coder/blob/main/flake.nix).
Learn more [how Nix works](https://nixos.org/guides/how-nix-works).

### Nix
Expand Down Expand Up @@ -305,9 +305,13 @@ to use the original commit title instead of the PR title.
When a merged PR on `main` should also ship in older releases, add the
`backport` label to the PR. The
[backport workflow](https://github.com/coder/coder/blob/main/.github/workflows/backport.yaml)
will automatically detect the latest three `release/*` branches,
cherry-pick the merge commit onto each one, and open PRs for
review.
will automatically detect the latest three `release/*` branches plus any
active ESR (Extended Support Release) branches, cherry-pick the merge
commit onto each one, and open PRs for review. A release that is both in
the latest three and an active ESR is only backported once.

Active ESR versions are defined in
[`scripts/lib/esr_versions.sh`](https://github.com/coder/coder/blob/main/scripts/lib/esr_versions.sh).

The label can be added before or after the PR is merged. Each backport
PR reuses the original title (e.g.
Expand Down
8 changes: 8 additions & 0 deletions scripts/lib/esr_versions.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/env bash

# Known active ESR (Extended Support Release) minor versions.
# Update this list when new ESR versions are designated or old ones reach end
# of life. This file is sourced by the backport workflow and the release
# calendar generator.
# shellcheck disable=SC2034 # ESR_VERSIONS is used by the sourcing script.
ESR_VERSIONS=(29 34)
7 changes: 4 additions & 3 deletions scripts/update-release-calendar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,10 @@ DOCS_FILE="docs/install/releases/index.md"
CALENDAR_START_MARKER="<!-- RELEASE_CALENDAR_START -->"
CALENDAR_END_MARKER="<!-- RELEASE_CALENDAR_END -->"

# Known active ESR (Extended Support Release) minor versions.
# Update this list when new ESR versions are designated or old ones reach end of life.
ESR_VERSIONS=(29 34)
# Source the shared ESR version list used by multiple scripts and workflows.
SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# shellcheck source=scripts/lib/esr_versions.sh
source "${SOURCE_DIR}/lib/esr_versions.sh"

# Check if a minor version is a known active ESR version.
is_esr_version() {
Expand Down
Loading