Skip to content
Merged
Changes from 16 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
33 changes: 33 additions & 0 deletions .github/workflows/check-merge-labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Check merge labels

on:
pull_request:
types: [labeled, unlabeled]
merge_group:
permissions: read-all

jobs:
label_checks:
runs-on: ubuntu-latest
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

should this always be spacetimedb-runner?

It seemed like that always forced the jobs onto a queue, even for these runs that don't require anything fancy.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah, generally the spacetimedb-runner is going to be much faster compared to the regular github ubuntu-latest runner, but for things like this its fine to just use the github runner.

steps:
- id: explicitly_disallowed
if: |
contains(github.event.pull_request.labels.*.name, 'do not merge')
run: |
echo "This is labeled \"Do not merge\"."
exit 1

- id: future_release
if: |
contains(github.event.pull_request.labels.*.name, 'release-0.9')
run: |
echo "This is targeted for a future release."
exit 1

- id: breaking_change
if: |
contains(github.event.pull_request.labels.*.name, 'abi-break') ||
contains(github.event.pull_request.labels.*.name, 'breaking change')
run: |
echo "This is a breaking change."
exit 1
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I made these all steps instead of e.g. different jobs because it cluttered up the list of checks in the PR view, but I don't feel strongly about it if there's a better organization.