From 90021a030ae3178cc9be51d53134e7c4d6031004 Mon Sep 17 00:00:00 2001 From: Luca Zaninotto Date: Fri, 17 Oct 2025 11:47:01 +0200 Subject: [PATCH] chore: Signal reviewer of migrations happening When a new PR that touches migrations is made, an action is triggered to signal the reviewer: PRs that handle migrations should be merged carefully, as they need to run accordingly to the state of the repo. Signed-off-by: Luca Zaninotto --- .github/workflows/migrations-check.yaml | 40 +++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 .github/workflows/migrations-check.yaml diff --git a/.github/workflows/migrations-check.yaml b/.github/workflows/migrations-check.yaml new file mode 100644 index 000000000..b8c1317e9 --- /dev/null +++ b/.github/workflows/migrations-check.yaml @@ -0,0 +1,40 @@ +# +# This file is part of Edgehog. +# +# Copyright 2025 SECO Mind Srl +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# SPDX-License-Identifier: Apache-2.0 +# + +name: Migrations check + +on: + # Run on pull requests matching apps + pull_request: + paths: + - "backend/priv/repo/migrations/**" + - "backend/priv/resource_snapshots/**" + - ".github/workflows/migrations-check.yaml" + +jobs: + comment: + runs-on: ubuntu-latest + permissions: write-all + steps: + - uses: mshick/add-pr-comment@v2 + with: + message: | + **⚠️ This PR chenges migrations and/or snapshots** + Ensure that it is are based on the latest changes in the base branch before merging.