From 50d88ebb3ac525bc1924826e526d3960fbebeab0 Mon Sep 17 00:00:00 2001 From: efb4f5ff-1298-471a-8973-3d47447115dc <73130443+efb4f5ff-1298-471a-8973-3d47447115dc@users.noreply.github.com> Date: Sun, 10 Apr 2022 14:34:02 +0000 Subject: [PATCH] Pr issue dependent (#1832) * Create dependent-issues.yml * Update dependent-issues.yml * Create no-response.yml * Update no-response.yml * Delete no-response.yml * Delete dependent-issues.yml * Add files via upload * Update dependent-issues.yml * Update dependent-issues.yml * changed daily check to hourly * version update * Update dependent-issues.yml * dependent add * Update dependent-issues.yml * Update dependent-issues.yml * Update dependent-issues.yml * Update dependent-issues.yml * Update dependent-issues.yml * Update dependent-issues.yml * Update dependent-issues.yml * Update dependent-issues.yml * Update dependent-issues.yml * Update dependent-issues.yml * Update dependent-issues.yml * Update dependent-issues.yml * Update dependent-issues.yml * Update dependent-issues.yml * Update PULL_REQUEST_TEMPLATE.md * added newline * update dependent issues pr description * Add files via upload * Delete conflicts.yml * Delete label-changes-requested.yml * Delete remove-outdated-labels.yml --- .github/PULL_REQUEST_TEMPLATE.md | 3 ++ .github/workflows/dependent-issues.yml | 60 ++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/workflows/dependent-issues.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 199861da..acea4b48 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -13,6 +13,9 @@ Please select what type of pull request this is: **Related issue** Please link the issue your pull request is referring to. If this pull request fully resolves the relevant issue, put "closes" before the issue number. Example: "closes #123456". +**Dependent PR/issue** +Please link the pull request or issue your pull request is dependent on to be merged or closed before merging this pull request. Put "depends on" or "blocked by" before the issue number. Example: "blocked by #" or "depends on #". + **Description** Please write a clear and concise description of what the pull request does. diff --git a/.github/workflows/dependent-issues.yml b/.github/workflows/dependent-issues.yml new file mode 100644 index 00000000..c794c29c --- /dev/null +++ b/.github/workflows/dependent-issues.yml @@ -0,0 +1,60 @@ +name: Dependent Issues + +on: + issues: + types: + - opened + - edited + - closed + - reopened + pull_request_target: + types: + - opened + - edited + - closed + - reopened + # Makes sure we always add status check for PRs. Useful only if + # this action is required to pass before merging. Otherwise, it + # can be removed. + - synchronize + + # Schedule a hourly check. Useful if you reference cross-repository + # issues or pull requests. Otherwise, it can be removed. + schedule: + - cron: '0 * * * *' + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: z0al/dependent-issues@v1.5.1 + env: + # (Required) The token to use to make API calls to GitHub. + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # (Optional) The token to use to make API calls to GitHub for remote repos. + GITHUB_READ_TOKEN: ${{ secrets.GITHUB_READ_TOKEN }} + + with: + # (Optional) The label to use to mark dependent issues + label: "PR/Issue: dependent" + + # (Optional) Enable checking for dependencies in issues. + # Enable by setting the value to "on". Default "off" + check_issues: on + + # (Optional) Ignore dependabot PRs. + # Enable by setting the value to "on". Default "off" + ignore_dependabot: off + + # (Optional) A comma-separated list of keywords. Default + # "depends on, blocked by" + keywords: depends on, blocked by + + # (Optional) A custom comment body. It supports `{{ dependencies }}` token. + comment: > + Alright! Looks like we need to wait for some _dependencies:_ + + {{ dependencies }} + + + Don't worry, I will continue watching the list above and keep this comment updated. To add or remove a dependency please update the description of this PR/issue.