From cd805f3e2c5f31b8e98c7849d3fe6c3225a0418b Mon Sep 17 00:00:00 2001 From: Jirka B Date: Mon, 28 Apr 2025 11:19:11 +0200 Subject: [PATCH 1/2] drop mergify --- .github/mergify.yml | 70 --------------------------------------------- 1 file changed, 70 deletions(-) delete mode 100644 .github/mergify.yml diff --git a/.github/mergify.yml b/.github/mergify.yml deleted file mode 100644 index e75925a1ad664..0000000000000 --- a/.github/mergify.yml +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright The Lightning AI team. -# -# 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. - -pull_request_rules: - - name: warn on conflicts - conditions: - - conflict - - -draft # filter-out GH draft PRs - - -label="has conflicts" - actions: - # comment: - # message: This pull request is now in conflict... :( - label: - add: ["has conflicts"] - - - name: resolved conflicts - conditions: - - -conflict - - label="has conflicts" - - -draft # filter-out GH draft PRs - - -merged # not merged yet - - -closed - actions: - label: - remove: ["has conflicts"] - - - name: Ready to Go - conditions: - - -conflict - - -draft # filter-out GH draft PRs - - -title~=(?i)wip # skip all PR that title contains “WIP” (ignoring case) - - "#approved-reviews-by>=2" # number of review approvals - - "#changes-requested-reviews-by=0" # no requested changes - actions: - label: - add: ["ready"] - - - name: Not ready yet - conditions: - - or: - - draft # filter-out GH draft PRs - - label="has conflicts" - - "#approved-reviews-by=0" # number of review approvals - - "#changes-requested-reviews-by>=1" # no requested changes - actions: - label: - remove: ["ready"] - - - name: add core reviewer - conditions: - - -conflict # skip if conflict - - -draft # filter-out GH draft PRs - - label="ready" - - "#approved-reviews-by<2" # number of review approvals - - "#review-requested<2" # number of requested reviews - actions: - request_reviews: - teams: - - "@Lightning-AI/core-lightning" From 6af43a3c63f4fe951ffd02fbe5eaa26a8488ca2f Mon Sep 17 00:00:00 2001 From: Jirka B Date: Mon, 28 Apr 2025 11:25:12 +0200 Subject: [PATCH 2/2] label conflist --- .github/workflows/label-conflicts.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/label-conflicts.yml diff --git a/.github/workflows/label-conflicts.yml b/.github/workflows/label-conflicts.yml new file mode 100644 index 0000000000000..06a809c48b541 --- /dev/null +++ b/.github/workflows/label-conflicts.yml @@ -0,0 +1,22 @@ +name: Label conflicts + +on: + push: + branches: ["main"] + pull_request_target: + types: ["synchronize", "reopened", "opened"] + +concurrency: + group: ${{ github.workflow }} + cancel-in-progress: false + +jobs: + triage-conflicts: + runs-on: ubuntu-latest + steps: + - uses: mschilde/auto-label-merge-conflicts@591722e97f3c4142df3eca156ed0dcf2bcd362bd # Oct 25, 2021 + with: + CONFLICT_LABEL_NAME: "has conflicts" + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MAX_RETRIES: 3 + WAIT_MS: 5000