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

HttpError: Not Found #515

Open
lukasmalkmus opened this issue Nov 18, 2022 · 8 comments
Open

HttpError: Not Found #515

lukasmalkmus opened this issue Nov 18, 2022 · 8 comments

Comments

@lukasmalkmus
Copy link

Repeatedly saw this error in a workflow run:

HttpError: Not Found
    at /home/runner/work/_actions/z0al/dependent-issues/v1/webpack:/dependent-issues/node_modules/@octokit/request/dist-node/index.js:86:1
    at processTicksAndRejections (internal/process/task_queues.js:97:5)

Using latest version.

@z0al
Copy link
Owner

z0al commented Nov 18, 2022

Hey. Do you have dependencies pointing to other private repositories?

@lukasmalkmus
Copy link
Author

lukasmalkmus commented Nov 18, 2022

Hey. Do you have dependencies pointing to other private repositories?

Sorry, can you elaborate? What kind of dependencies?

If you mean issues pointing to other private repositories, then yes. Although I have configured a GITHUB_READ_TOKEN:

name: Dependent PRs

on:
  issues:
    types:
      - opened
      - edited
      - reopened
  pull_request_target:
    types:
      - opened
      - edited
      - reopened
      - synchronize
  schedule:
    - cron: "0 * * * *"

jobs:
  check:
    name: Check
    runs-on: ubuntu-latest
    if: github.repository_owner == 'myorg'
    steps:
      - uses: z0al/dependent-issues@v1
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GITHUB_READ_TOKEN: ${{ secrets.MY_AUTOMATION_TOKEN }}
        with:
          label: dependent
          keywords: depends on, blocked by, needs

The issue occurs on a PR that depends on another PR in the same repository. It does not occur for PRs that don't specify any of the keywords. But it does occur when it is run on schedule (I guess as it checks all PRs).

@z0al
Copy link
Owner

z0al commented Nov 19, 2022

If you mean issues pointing to other private repositories

Exactly. But that doesn't seem relevant based on your comment.

But it does occur when it is run on schedule (I guess as it checks all PRs).

To make sure I understand. Are you saying the 404 issue happens for all PRs even those without any keywords?

@lukasmalkmus
Copy link
Author

To make sure I understand. Are you saying the 404 issue happens for all PRs even those without any keywords?

Sorry if I was unclear: The 404 issue happens only for PRs with keywords. It also happens when the workflow is run on a schedule, unrelated to a PR.

@z0al
Copy link
Owner

z0al commented Nov 19, 2022

Got it. I can't think of something at the moment but will check when I get some free time

@lukasmalkmus
Copy link
Author

It is super odd. Just started recently. I also made sure the token is still correct and valid.

Also seeing this, but that would be a separate issue: Node.js 12 actions are deprecated. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: z0al/dependent-issues@v1

@johncardiologs
Copy link
Contributor

I opened an issue for this @lukasmalkmus #535

@chrisoro
Copy link

chrisoro commented Sep 25, 2023

I have the same problem as @lukasmalkmus. Wanted to run it on a GitHub Enterprise instance but always getting the following output:

##[debug]..Evaluating String:
##[debug]..=> 'HUB_API'
##[debug]=> '***'
##[debug]Result: '***'
##[debug]Evaluating condition for step: 'Run z0al/dependent-issues@v1'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Run z0al/dependent-issues@v1
##[debug]Loading inputs
##[debug]Loading env
Run z0al/dependent-issues@v1
  with:
    label: dependent
    check_issues: off
    ignore_dependabot: on
    keywords: depends on, blocked by
    comment: This PR/issue depends on:
  {{ dependencies }}
  
  env:
    GITHUB_TOKEN: ***
::group::Context
Context
  Payload issue: #2
  ::endgroup::
::group::Checking #2
Checking #2
  No dependencies found. Running clean-up
  Error: HttpError: Not Found
      at /opt/app-root/src/_work/_actions/z0al/dependent-issues/v1/webpack:/dependent-issues/node_modules/@octokit/request/dist-node/index.js:8[6](https://XXX/TA/.chris_playground/actions/runs/1207258/job/2478010#step:2:6):1
      at processTicksAndRejections (node:internal/process/task_queues:[9](https://XXX/TA/.chris_playground/actions/runs/1207258/job/2478010#step:2:9)6:5)
  ##[debug]Node Action run completed with exit code 1
  ##[debug]Finishing: Run z0al/dependent-issues@v1

The action always fails and doesn't find dependencies. Is GHE not supported?

edit: Looking at the code, you are just supporting github.com, right?

private urlRegex =
/https?:\/\/github\.com\/(?:\w[\w-.]+\/\w[\w-.]+|\B)\/(?:issues|pull)\/[1-9]\d*\b/;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants