git.delta.rocks / unique-network / refs/commits / 0d218a2237c3

difftreelog

fix as per documentation

Alexander Aksenov2022-09-02parent: #5ab2859.patch.diff
in: master

3 files changed

modified.github/workflows/ci-develop.ymldiffbeforeafterboth
before · .github/workflows/ci-develop.yml
1name: develop23on:4  pull_request:5    branches: [ 'develop' ]6    types: [ opened, reopened, synchronize, ready_for_review ]78concurrency:9  group: ${{ github.workflow }}-${{ github.head_ref }}10  cancel-in-progress: true1112jobs:1314  yarn-test-dev:15    if: github.event.pull_request.draft == false16    uses: ./.github/workflows/dev-build-tests_v2.yml1718  unit-test:19    if: github.event.pull_request.draft == false20    uses: ./.github/workflows/unit-test_v2.yml2122  forkless:23    if: contains( github.event.pull_request.labels.*.name, 'forkless') 24    uses: ./.github/workflows/forkless.yml2526  canary:27    if: contains( github.event.pull_request.labels.*.name, 'canary')28    uses: ./.github/workflows/canary.yml29    secrets: inherit # pass all secrets303132  xcm:33    if: contains( github.event.pull_request.labels.*.name, 'xcm')34    uses: ./.github/workflows/xcm.yml35    secrets: inherit # pass all secrets3637  codestyle:38    uses: ./.github/workflows/codestyle_v2.yml
after · .github/workflows/ci-develop.yml
1name: develop23on:4  pull_request:5    branches: [ 'develop' ]6    types: [ opened, reopened, synchronize, ready_for_review ]78concurrency:9  group: ${{ github.workflow }}-${{ github.head_ref }}10  cancel-in-progress: true1112jobs:1314  yarn-test-dev:15    if: ${{ github.event.pull_request.draft == 'false' }}16    uses: ./.github/workflows/dev-build-tests_v2.yml1718  unit-test:19    if: ${{ github.event.pull_request.draft == 'false' }}20    uses: ./.github/workflows/unit-test_v2.yml2122  forkless:23    if: ${{ contains( github.event.pull_request.labels.*.name, 'forkless') }}24    uses: ./.github/workflows/forkless.yml2526  canary:27    if: ${{ contains( github.event.pull_request.labels.*.name, 'canary') }}28    uses: ./.github/workflows/canary.yml29    secrets: inherit # pass all secrets303132  xcm:33    if: ${{ contains( github.event.pull_request.labels.*.name, 'xcm') }}34    uses: ./.github/workflows/xcm.yml35    secrets: inherit # pass all secrets3637  codestyle:38    uses: ./.github/workflows/codestyle_v2.yml
modified.github/workflows/ci-master.ymldiffbeforeafterboth
--- a/.github/workflows/ci-master.yml
+++ b/.github/workflows/ci-master.yml
@@ -12,27 +12,27 @@
 jobs:
 
   unit-test:
-    if: github.event.pull_request.draft != true
+    if:  ${{ github.event.pull_request.draft != 'true' }}
     uses: ./.github/workflows/unit-test_v2.yml
 
   node-only-update:
-    if: github.event.pull_request.draft == false
+    if: ${{ github.event.pull_request.draft == 'false' }}
     uses: ./.github/workflows/node-only-update_v2.yml
 
   forkless:
-    if: contains( github.event.pull_request.labels.*.name, 'forkless')
+    if: ${{ contains( github.event.pull_request.labels.*.name, 'forkless') }}
     uses: ./.github/workflows/forkless.yml
 
   canary:
-    if: contains( github.event.pull_request.labels.*.name, 'canary')
+    if: ${{ contains( github.event.pull_request.labels.*.name, 'canary') }}
     uses: ./.github/workflows/canary.yml
     secrets: inherit # pass all secrets
 
   xcm:
-    if: contains( github.event.pull_request.labels.*.name, 'xcm')
+    if: ${{ contains( github.event.pull_request.labels.*.name, 'xcm') }}
     uses: ./.github/workflows/xcm.yml
     secrets: inherit # pass all secrets
 
   codestyle:
-    if: github.event.pull_request.draft == false
+    if: ${{ github.event.pull_request.draft == 'false' }}
     uses: ./.github/workflows/codestyle_v2.yml
\ No newline at end of file
modified.github/workflows/codestyle_v2.ymldiffbeforeafterboth
--- a/.github/workflows/codestyle_v2.yml
+++ b/.github/workflows/codestyle_v2.yml
@@ -8,24 +8,6 @@
     runs-on: self-hosted-ci
 
     steps:
-      - name: Skip if pull request is in Draft
-        # `if: github.event.pull_request.draft == true` should be kept here, at
-        # the step level, rather than at the job level. The latter is not
-        # recommended because when the PR is moved from "Draft" to "Ready to
-        # review" the workflow will immediately be passing (since it was skipped),
-        # even though it hasn't actually ran, since it takes a few seconds for
-        # the workflow to start. This is also disclosed in:
-        # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/17
-        # That scenario would open an opportunity for the check to be bypassed:
-        # 1. Get your PR approved
-        # 2. Move it to Draft
-        # 3. Push whatever commits you want
-        # 4. Move it to "Ready for review"; now the workflow is passing (it was
-        #    skipped) and "Check reviews" is also passing (it won't be updated
-        #    until the workflow is finished)
-        if: github.event.pull_request.draft == true
-        run: exit 1
-
       - uses: actions/checkout@v3
       - name: Install latest nightly
         uses: actions-rs/toolchain@v1
@@ -46,24 +28,7 @@
     runs-on: self-hosted-ci
       
     steps:
-      - name: Skip if pull request is in Draft
-        # `if: github.event.pull_request.draft == true` should be kept here, at
-        # the step level, rather than at the job level. The latter is not
-        # recommended because when the PR is moved from "Draft" to "Ready to
-        # review" the workflow will immediately be passing (since it was skipped),
-        # even though it hasn't actually ran, since it takes a few seconds for
-        # the workflow to start. This is also disclosed in:
-        # https://github.community/t/dont-run-actions-on-draft-pull-requests/16817/17
-        # That scenario would open an opportunity for the check to be bypassed:
-        # 1. Get your PR approved
-        # 2. Move it to Draft
-        # 3. Push whatever commits you want
-        # 4. Move it to "Ready for review"; now the workflow is passing (it was
-        #    skipped) and "Check reviews" is also passing (it won't be updated
-        #    until the workflow is finished)
-        if: github.event.pull_request.draft == true
-        run: exit 1
-        
+         
       - uses: actions/checkout@v3
       - name: Install substrate dependencies
         run: sudo apt-get install libssl-dev pkg-config libclang-dev clang