From 78294c1827af75e487ab3e6852263003882a6554 Mon Sep 17 00:00:00 2001 From: Janki Chhatbar Date: Sat, 17 Jul 2021 16:25:10 +0530 Subject: [PATCH] Enable PR dependency check jobs This job marks a PR `dependent` whenever a dependent PR is mentioned via `Depends on/ depends on` keyword. The job fails until the dependent PR is not merged. This helps in properly managing merging of dependent PRs. Signed-off-by: Janki Chhatbar --- .github/workflows/dependent-issues.yml | 38 ++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/dependent-issues.yml diff --git a/.github/workflows/dependent-issues.yml b/.github/workflows/dependent-issues.yml new file mode 100644 index 0000000..1dc8e34 --- /dev/null +++ b/.github/workflows/dependent-issues.yml @@ -0,0 +1,38 @@ +--- +name: PR Dependencies + +on: + issues: + types: + - opened + - edited + - closed + - reopened + - synchronize + pull_request_target: + types: + - opened + - edited + - closed + - reopened + - synchronize + schedule: + - cron: '0 0/6 * * *' # every 6 hours + +jobs: + check: + name: Check Dependencies + runs-on: ubuntu-latest + steps: + - uses: z0al/dependent-issues@70a1b2d4ee1cdc743af33498bd0204123953a887 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + # The label to use to mark dependent issues + label: dependent + + # Enable checking for dependencies in issues. + check_issues: on + + # A comma-separated list of keywords to mark dependency. + keywords: depends on, Depends on \ No newline at end of file