From 51a85bbf6a19c23bba3019c7fbaf50410f2b07b0 Mon Sep 17 00:00:00 2001 From: Harald Heckmann Date: Thu, 10 Aug 2023 11:03:38 +0200 Subject: [PATCH] Run checks when the "s:accepted" label is set (#1074) * Run checks when the "s:accepted" label is set This is required for Mergify to automatically merge PRs using the merge queue. Without the changes in this commit, when the label "s:accepted" is set, the checks are skipped and Mergify's merge conditions are not satisfied. --- .github/workflows/coverage.yml | 6 ++++- .github/workflows/rust.yml | 42 ++++++++++++++++++++++++++++------ 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index ac666c4c8..8a43c0520 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -12,7 +12,11 @@ env: jobs: coverage: name: Coverage - if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed') || github.event_name == 'push') + if: | + github.event_name == 'pull_request' && + (contains(github.event.pull_request.labels.*.name, 's:review-needed') || + contains(github.event.pull_request.labels.*.name, 's:accepted')) || + github.event_name == 'push' runs-on: ubuntu-latest steps: - name: Checkout repository diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 5cc593881..81e8310e8 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -12,7 +12,11 @@ env: jobs: format: name: Format - if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed') || github.event_name == 'push') + if: | + github.event_name == 'pull_request' && + (contains(github.event.pull_request.labels.*.name, 's:review-needed') || + contains(github.event.pull_request.labels.*.name, 's:accepted')) || + github.event_name == 'push' runs-on: ubuntu-latest steps: - name: Checkout repository @@ -33,7 +37,11 @@ jobs: copyright: name: Copyright Notices - if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed') || github.event_name == 'push') + if: | + github.event_name == 'pull_request' && + (contains(github.event.pull_request.labels.*.name, 's:review-needed') || + contains(github.event.pull_request.labels.*.name, 's:accepted')) || + github.event_name == 'push' runs-on: ubuntu-latest steps: - name: Checkout repository @@ -54,7 +62,11 @@ jobs: checks: name: Checks - if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed') || github.event_name == 'push') + if: | + github.event_name == 'pull_request' && + (contains(github.event.pull_request.labels.*.name, 's:review-needed') || + contains(github.event.pull_request.labels.*.name, 's:accepted')) || + github.event_name == 'push' runs-on: ubuntu-latest strategy: matrix: @@ -78,7 +90,11 @@ jobs: benchmark: name: Quick check benchmarks - if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed') || github.event_name == 'push') + if: | + github.event_name == 'pull_request' && + (contains(github.event.pull_request.labels.*.name, 's:review-needed') || + contains(github.event.pull_request.labels.*.name, 's:accepted')) || + github.event_name == 'push' runs-on: ubuntu-latest steps: - name: Checkout repository @@ -91,7 +107,11 @@ jobs: test_standalone: name: Test standalone build - if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed') || github.event_name == 'push') + if: | + github.event_name == 'pull_request' && + (contains(github.event.pull_request.labels.*.name, 's:review-needed') || + contains(github.event.pull_request.labels.*.name, 's:accepted')) || + github.event_name == 'push' runs-on: ubuntu-latest steps: - name: Checkout repository @@ -122,7 +142,11 @@ jobs: test_parachain: name: Test parachain build - if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed') || github.event_name == 'push') + if: | + github.event_name == 'pull_request' && + (contains(github.event.pull_request.labels.*.name, 's:review-needed') || + contains(github.event.pull_request.labels.*.name, 's:accepted')) || + github.event_name == 'push' runs-on: ubuntu-latest steps: - name: Checkout repository @@ -153,7 +177,11 @@ jobs: fuzz: name: Fuzz - if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 's:review-needed') || github.event_name == 'push') + if: | + github.event_name == 'pull_request' && + (contains(github.event.pull_request.labels.*.name, 's:review-needed') || + contains(github.event.pull_request.labels.*.name, 's:accepted')) || + github.event_name == 'push' runs-on: ubuntu-latest steps: - name: Checkout repository