Skip to content
9 changes: 9 additions & 0 deletions .github/labels-calver.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- color: FF5959
description: Breaking changes which must be reviewed before being included in the monthly release.
name: 'calver: breaking'
- color: AB9EF7
description: Changes which should be included in the monthly release.
name: 'calver: monthly'
- color: 9EC9F7
description: Non-breaking changes which should be included in a patch release.
name: 'calver: patch'
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ on:
description: A GitHub personal access token with write access to the project

jobs:
enforce-semver-labels:
enforce-calver-labels:
uses: localstack/meta/.github/workflows/pr-enforce-pr-labels.yml@main
with:
labels: "semver: patch, semver: minor, semver: major"
labels: "calver: patch, calver: monthly, calver: breaking"
secrets:
github-token: ${{ secrets.github-token }}
40 changes: 40 additions & 0 deletions .github/workflows/pr-enforce-label-group.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Ensures all the relevant groups of labels are applied to a PR.
name: Enforce All PR Labels

on:
workflow_call:
secrets:
github-token:
required: true
description: A GitHub personal access token with write access to the project

jobs:
calver:
name: Calendar Versioning Labels
runs-on: ubuntu-latest
steps:
- uses: localstack/meta/.github/workflows/pr-enforce-pr-labels.yml@main
with:
labels: "calver: patch, calver: monthly, calver: breaking"
secrets:
github-token: ${{ secrets.github-token }}

docs:
name: Documentation Labels
runs-on: ubuntu-latest
steps:
- uses: localstack/meta/.github/workflows/pr-enforce-pr-labels.yml@main
with:
labels: "docs: needed, docs: skip"
secrets:
github-token: ${{ secrets.github-token }}

notes:
name: Notes Labels
runs-on: ubuntu-latest
steps:
- uses: localstack/meta/.github/workflows/pr-enforce-pr-labels.yml@main
with:
labels: "notes: needed, notes: skip"
secrets:
github-token: ${{ secrets.github-token }}
39 changes: 0 additions & 39 deletions .github/workflows/pr-enforce-labels.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/pr-enforce-no-major.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Enforce no major or minor labels
# Enforces changes merged to main to be of patch only. Activated during a release code-freeze.
name: Enforce Patch Only

on:
workflow_call:
Expand All @@ -8,7 +9,6 @@ on:
description: A GitHub token with access to the issues of the calling repo

jobs:
# make sure no PRs with major or minor label are merged
enforce-no-major-label:
runs-on: ubuntu-latest
permissions:
Expand All @@ -19,7 +19,7 @@ jobs:
with:
mode: exactly
count: 0
labels: "semver: major, semver: minor"
labels: "calver: monthly, calver: breaking, semver: minor, semver: major"
add_comment: true
token: ${{ secrets.github-token }}
message: "Currently, only patch changes are allowed on main. Your PR labels ({{ applied }}) indicate that it cannot be merged into the main at this time."
5 changes: 2 additions & 3 deletions .github/workflows/pr-enforce-pr-labels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,13 @@ on:
labels:
required: true
type: string
description: "comma separated list of labels where exactly one has to be set on PRs"
description: "A comma separated list of labels where exactly one has to be set on PRs."
secrets:
github-token:
required: true
description: A GitHub token with access to the issues of the calling repo
description: "A GitHub token with access to the issues of the calling repo."

jobs:
# make sure _all_ PRs have a semver label
enforce-pr-labels:
runs-on: ubuntu-latest
steps:
Expand Down