Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Status remains pending even after closing the dependent issue #377

Open
Assem-Hafez opened this issue Feb 23, 2022 · 5 comments
Open

Status remains pending even after closing the dependent issue #377

Assem-Hafez opened this issue Feb 23, 2022 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@Assem-Hafez
Copy link

The issue is in the same repository.
Here are the used config:

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

jobs:
  check:
    runs-on: ubuntu-latest
    steps:
      - uses: z0al/dependent-issues@v1
        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.ASSEM_REPO_ACCESS_FOR_ACTIONS }}

        with:
          # (Optional) The label to use to mark dependent issues
          label: dependent

          # (Optional) Enable checking for dependencies in issues.
          # Enable by setting the value to "on". Default "off"
          check_issues: off

          # (Optional) A comma-separated list of keywords. Default
          # "depends on, blocked by"
          keywords: depends on, blocked by

image

@Assem-Hafez Assem-Hafez changed the title Status stays as pending even after closing the dependent issue Status remains pending even after closing the dependent issue Feb 23, 2022
@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link

efb4f5ff-1298-471a-8973-3d47447115dc commented Mar 5, 2022

maybe im being ignorant about this but ur are using v1 but this repo is already on v1.5.1. maybe that will resolve ur issue

@z0al
Copy link
Owner

z0al commented Mar 10, 2022

are using v1 but this repo is already on v1.5.1

I understand why you would think that but in this case v1 is just an alias to the latest 1.x.x so you don't have to update your config whenever there is a compatible change. It's a common practice with GitHub actions

@z0al
Copy link
Owner

z0al commented Mar 10, 2022

Hi @Assem-Hafez , is the repo in question public by any chance so I could take a look?

@z0al z0al added the help wanted Extra attention is needed label Mar 18, 2022
@efb4f5ff-1298-471a-8973-3d47447115dc
Copy link

efb4f5ff-1298-471a-8973-3d47447115dc commented Apr 11, 2022

hi @z0al i have the same problem

see efb4f5ff-1298-471a-8973-3d47447115dc/FreeTube#18

name: Dependent PRs

on:
  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 check every two hours. Useful if you reference cross-repository
  # issues or pull requests. Otherwise, it can be removed.
  schedule:
    - cron: '0 */2 * * *'

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: dependent"

          # (Optional) Enable checking for dependencies in issues.
          # Enable by setting the value to "on". Default "off"
          check_issues: off

          # (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.

@z0al
Copy link
Owner

z0al commented Apr 12, 2022

@efb4f5ff-1298-471a-8973-3d47447115dc I checked the log and it looks like this:

Run z0al/dependent-issues@v1.5.1
Context
  Payload issue: None or closed
  No. of open issues: 1
Checking #18
  Depends on: #17, #16
  Blocked by: 
  Updating labels
  Updating Action comments
  Updating PR status. Skipped

The action skipped updating the PR status thinking it's a normal issue, not a PR. There is something wrong with that check. I will have to check later. Thank you for the helpful context.

Side note: You can remove the ignore_dependabot option as it's no longer a thing (I forgot to remove it from the readme) my bad. See my comment on the referenced PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants