]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
.github: check if PR deps are merged/closed
authorErnesto Puerta <epuertat@redhat.com>
Fri, 8 Oct 2021 17:14:17 +0000 (19:14 +0200)
committerErnesto Puerta <epuertat@redhat.com>
Fri, 8 Oct 2021 17:14:17 +0000 (19:14 +0200)
If a PR description includes `blocked by <pr>` or `depends on <pr>`,
this check will fail until the referred PRs are either merged or closed.

If this check is made required, it'll also block the merge button.

The details of the supported syntax can be checked at:
https://github.com/marketplace/actions/pr-dependency-check

Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
.github/workflows/pr-check-deps.yml [new file with mode: 0644]

diff --git a/.github/workflows/pr-check-deps.yml b/.github/workflows/pr-check-deps.yml
new file mode 100644 (file)
index 0000000..7815b8f
--- /dev/null
@@ -0,0 +1,10 @@
+name: Check PR dependencies
+on: [pull_request_target]
+jobs:
+  check_dependencies:
+    runs-on: ubuntu-latest
+    name: Check PR Dependencies
+    steps:
+    - uses: gregsdennis/dependencies-action@80b5ffec566913b1494d5a8577ab0d60e476271d
+      env:
+        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}