From c9eddedecc358534433a7a3330f10ab1e2c81dd5 Mon Sep 17 00:00:00 2001 From: Eric Bouchut Date: Thu, 24 Oct 2024 18:18:16 +0200 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=91=B7=20Add=20a=20workflow=20to=20pr?= =?UTF-8?q?event=20blocked=20PRs=20from=20being=20merged?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit To indicate that PR2 depends on PR1, add `Depends on #1` to PR2's description This GitHub workflow uses a GitHub Action to check for issues blocking a PR. The term "issue" above is misleading as it can denote another PR or a GitHub issue from the same repository. iThis syntax does not allow cross repository PR dependencies. See: - GH Action: https://github.com/Levi-Lesches/blocking-issues - Discussion about the need for such a feature in GitHub and the open-source workarounds in the meantime: https://github.com/orgs/community/discussions/4477#discussioncomment-1039627 --- .github/workflows/pr_dependencies_check.yml | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/pr_dependencies_check.yml diff --git a/.github/workflows/pr_dependencies_check.yml b/.github/workflows/pr_dependencies_check.yml new file mode 100644 index 00000000..60edecc2 --- /dev/null +++ b/.github/workflows/pr_dependencies_check.yml @@ -0,0 +1,23 @@ +name: Prevent Blocked PRs from being Merged + +on: + pull_request: + types: + - opened + - edited + - closed + - reopened + issues: + types: + - opened + - edited + - deleted + - transferred + - closed + - reopened + +jobs: + blocking_issues: + runs-on: ubuntu-latest + steps: + - uses: Levi-Lesches/blocking-issues@v2 From 746adb92fb1d7ef6d43b9713adffb504aa93a4db Mon Sep 17 00:00:00 2001 From: Eric Bouchut Date: Sun, 27 Oct 2024 10:50:09 +0100 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=92=9A=20Fix=20PR=20Dependencies=20Ch?= =?UTF-8?q?eck=20Workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issues indentation was off. --- .github/workflows/pr_dependencies_check.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/pr_dependencies_check.yml b/.github/workflows/pr_dependencies_check.yml index 60edecc2..2bb90c27 100644 --- a/.github/workflows/pr_dependencies_check.yml +++ b/.github/workflows/pr_dependencies_check.yml @@ -7,14 +7,14 @@ on: - edited - closed - reopened - issues: - types: - - opened - - edited - - deleted - - transferred - - closed - - reopened + issues: + types: + - opened + - edited + - deleted + - transferred + - closed + - reopened jobs: blocking_issues: