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
9 changes: 9 additions & 0 deletions .github/labels-calver.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: For a (separate) cleanup PR, would it make sense to also remove the semver label definition then?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left a comment on the localstack-core PR!

TL;DR I thought it'd be good to keep these since not all our repositories use CalVer and some use SemVer which may want to sync tags (in practice and in hindsight the only repos which do use a labels sync are moving to CalVer but in the future if more repos sync their labels they can opt into using our existing SemVer ones!)

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'
14 changes: 0 additions & 14 deletions .github/workflows/pr-enforce-docs-labels.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion: I would suggest to separate the two things handled in this PR:

Cleanup workflows that might not be used anymore.
Add support for the new calver labels and their enforcement.

This would help getting the support for calver over the line, while we can discuss if the workflows you would like to clean up really can be removed already.
Same for the changes in .github/workflows/pr-enforce-semver-labels.yml and the README btw.

Copy link
Author

@aidehn aidehn Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah this one was only used by Snowflake - I think depending on what @hovaesco says on this PR and the other PR I think you're right - it might be worth moving this change out and cleaning up the workflows another time just so we can get these changes over the line!

Same with pr-enforce-semver-labels.yml - I believe it's not used by any major repo (only internal repos) but if the final opinion is to not remove this then I can clean this up another time too! 💯

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Enforce PR labels
# Ensures all the relevant groups of labels are applied to a PR.
name: Enforce All PR Labels

on:
workflow_call:
Expand All @@ -8,16 +9,15 @@ on:
description: A GitHub personal access token with write access to the project

jobs:
semver:
calver:
runs-on: ubuntu-latest
steps:
- uses: mheap/github-action-required-labels@v5
with:
mode: exactly
count: 1
labels: "semver: patch, semver: minor, semver: major"
labels: "calver: patch, calver: monthly, calver: breaking"
token: ${{ secrets.github-token }}

docs:
runs-on: ubuntu-latest
steps:
Expand All @@ -27,7 +27,6 @@ jobs:
count: 1
labels: "docs: needed, docs: skip"
token: ${{ secrets.github-token }}

notes:
runs-on: ubuntu-latest
steps:
Expand All @@ -36,4 +35,4 @@ jobs:
mode: exactly
count: 1
labels: "notes: needed, notes: skip"
token: ${{ secrets.github-token }}
token: ${{ secrets.github-token }}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Enforce no major labels
name: Enforce no Breaking Changes

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

jobs:
# make sure no PRs with major label are merged
enforce-no-major-label:
enforce-no-breaking-changes:
runs-on: ubuntu-latest
permissions:
issues: write
Expand All @@ -19,7 +18,7 @@ jobs:
with:
mode: exactly
count: 0
labels: "semver: major"
labels: "calver: breaking, semver: major"
add_comment: true
token: ${{ secrets.github-token }}
message: "Currently, only minor and patch changes are allowed on main. Your PR labels ({{ applied }}) indicate that it cannot be merged into the main at this time."
message: "Currently, no breaking changes are allowed on main. Your PR labels ({{ applied }}) indicate that it cannot be merged into the main at this time."
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 code-freeze.
name: Enforce Patch Only

on:
workflow_call:
Expand All @@ -8,8 +9,7 @@ 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:
enforce-patch-label:
runs-on: ubuntu-latest
permissions:
issues: write
Expand All @@ -19,7 +19,7 @@ jobs:
with:
mode: exactly
count: 0
labels: "semver: major, semver: minor"
labels: "calver: monthly, calver: breaking, semver: major, semver: minor"
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
14 changes: 0 additions & 14 deletions .github/workflows/pr-enforce-semver-labels.yml

This file was deleted.

45 changes: 8 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,9 @@ jobs:
github-token: ${{ secrets.REPO_ACCESS_PAT }}
```

## pr-enforce-no-major
## pr-enforce-no-breaking-changes
```yaml
name: Enforce no major on main
name: Enforce no breaking changes

on:
pull_request_target:
Expand All @@ -85,16 +85,16 @@ on:
- main

jobs:
enforce-no-major:
enforce-no-breaking-changes:
permissions:
issues: write
pull-requests: write
uses: localstack/meta/.github/workflows/pr-enforce-no-major.yml@main
uses: localstack/meta/.github/workflows/pr-enforce-no-breaking-changes.yml@main
secrets:
github-token: ${{ secrets.REPO_ACCESS_PAT }}
```

## pr-enforce-no-major-minor
## pr-enforce-patch-only
```yaml
name: Enforce no major or minor on main

Expand All @@ -110,41 +110,12 @@ jobs:
permissions:
issues: write
pull-requests: write
uses: localstack/meta/.github/workflows/pr-enforce-no-major-minor.yml@main
uses: localstack/meta/.github/workflows/pr-enforce-patch-only.yml@main
secrets:
github-token: ${{ secrets.REPO_ACCESS_PAT }}
```

## pr-enforce-semver-labels
```yaml
name: Enforce SemVer Labels
on:
pull_request_target:
types: [labeled, unlabeled, opened]

jobs:
enforce-semver-labels:
uses: localstack/meta/.github/workflows/pr-enforce-semver-labels.yml@main
secrets:
github-token: ${{ secrets.REPO_ACCESS_PAT }}
```

## pr-enforce-docs-labels
```yaml
name: Enforce Docs Labels

on:
pull_request_target:
types: [labeled, unlabeled, opened]

jobs:
enforce-docs-labels:
uses: localstack/meta/.github/workflows/pr-enforce-docs-labels.yml@main
secrets:
github-token: ${{ secrets.REPO_ACCESS_PAT }}
```

## pr-enforce-labels
## pr-enforce-label-groups
```yaml
name: Enforce Labels

Expand All @@ -154,7 +125,7 @@ on:

jobs:
labels:
uses: localstack/meta/.github/workflows/pr-enforce-core-labels.yml@main
uses: localstack/meta/.github/workflows/pr-enforce-label-groups.yml@main
secrets:
github-token: ${{ secrets.REPO_ACCESS_PAT }}
```
Expand Down