]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Fix duplication of checks on internal PRs (#1986)
authorRichard Si <63936253+ichard26@users.noreply.github.com>
Sun, 14 Feb 2021 15:23:47 +0000 (10:23 -0500)
committerGitHub <noreply@github.com>
Sun, 14 Feb 2021 15:23:47 +0000 (07:23 -0800)
Internal PRs (that come from branches of psf/black) match both the push
and pull_request events. This leads to a duplication of test, lint, etc.
checks on such PRs. Not only is it a waste of resources, it makes the
Status Checks UI more frustrating to go through.

Patch taken from:
https://github.community/t/duplicate-checks-on-push-and-pull-request-simultaneous-event/18012

.github/workflows/doc.yml
.github/workflows/fuzz.yml
.github/workflows/lint.yml
.github/workflows/primer.yml
.github/workflows/test.yml

index d266e55aa021ceb5dd7810a36c5817b2f8072a9c..930b6d440ff04fef065fd00cec2bc97f71146323 100644 (file)
@@ -16,8 +16,14 @@ on:
 
 jobs:
   build:
 
 jobs:
   build:
-    runs-on: ubuntu-latest
+    # We want to run on external PRs, but not on our own internal PRs as they'll be run
+    # by the push to the branch. Without this if check, checks are duplicated since
+    # internal PRs match both the push and pull_request events.
+    if:
+      github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
+      github.repository
 
 
+    runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v2
 
     steps:
       - uses: actions/checkout@v2
 
index 0153767509a7ece2cbedb377b5e85151d8672826..f3b688f3ef69e7a5db5ef781f1eae62af230b43a 100644 (file)
@@ -4,6 +4,13 @@ on: [push, pull_request]
 
 jobs:
   build:
 
 jobs:
   build:
+    # We want to run on external PRs, but not on our own internal PRs as they'll be run
+    # by the push to the branch. Without this if check, checks are duplicated since
+    # internal PRs match both the push and pull_request events.
+    if:
+      github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
+      github.repository
+
     runs-on: ubuntu-latest
     strategy:
       fail-fast: false
     runs-on: ubuntu-latest
     strategy:
       fail-fast: false
index fa7286eec1fb0415499aa6a945892679807eb404..e01e9ade5e20941c2cf832ac1e93dc65c97dfb81 100644 (file)
@@ -4,6 +4,13 @@ on: [push, pull_request]
 
 jobs:
   build:
 
 jobs:
   build:
+    # We want to run on external PRs, but not on our own internal PRs as they'll be run
+    # by the push to the branch. Without this if check, checks are duplicated since
+    # internal PRs match both the push and pull_request events.
+    if:
+      github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
+      github.repository
+
     runs-on: ubuntu-latest
     strategy:
       matrix:
     runs-on: ubuntu-latest
     strategy:
       matrix:
index b623b9383451e72c59b1be2196c9d3ce09a27aa9..4c5751ae996e8834fe19623666f9a317ddcc15d1 100644 (file)
@@ -4,6 +4,13 @@ on: [push, pull_request]
 
 jobs:
   build:
 
 jobs:
   build:
+    # We want to run on external PRs, but not on our own internal PRs as they'll be run
+    # by the push to the branch. Without this if check, checks are duplicated since
+    # internal PRs match both the push and pull_request events.
+    if:
+      github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
+      github.repository
+
     runs-on: ${{ matrix.os }}
     strategy:
       fail-fast: false
     runs-on: ${{ matrix.os }}
     strategy:
       fail-fast: false
index 8dd4e4f59fd48b626715a9eaaca5a99327cf2ed8..bec769064c2c7e544b50c3cdfd109994a1012f0a 100644 (file)
@@ -4,6 +4,13 @@ on: [push, pull_request]
 
 jobs:
   build:
 
 jobs:
   build:
+    # We want to run on external PRs, but not on our own internal PRs as they'll be run
+    # by the push to the branch. Without this if check, checks are duplicated since
+    # internal PRs match both the push and pull_request events.
+    if:
+      github.event_name == 'push' || github.event.pull_request.head.repo.full_name !=
+      github.repository
+
     runs-on: ${{ matrix.os }}
     strategy:
       fail-fast: false
     runs-on: ${{ matrix.os }}
     strategy:
       fail-fast: false