Skip to content

Commit

Permalink
Run checks when the "s:accepted" label is set (#1074)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
sea212 authored Aug 10, 2023
1 parent 99beab2 commit 51a85bb
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 8 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
42 changes: 35 additions & 7 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 51a85bb

Please sign in to comment.