Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting 404 for an issue that exist and is open #2

Open
RonenYAtZenity opened this issue Jul 13, 2022 · 5 comments
Open

Getting 404 for an issue that exist and is open #2

RonenYAtZenity opened this issue Jul 13, 2022 · 5 comments

Comments

@RonenYAtZenity
Copy link

RonenYAtZenity commented Jul 13, 2022

I am running the action based on the readme example. When I do it it return 0 though it succeed to extract the issue number from the PR description and it builds a valid issue link that when I use it the issue is open with no problems. You can find below the action log.

Run HarshCasper/validate-issues-over-pull-requests@v0.1.1
  with:
    prbody: Fixes #52 
  
  Description of the PR content:
  Added SNS support for AWS backup such that, if a backup job fails, an email will be sent to the eng team 
  
    prurl: https://api.github.com/repos/<MASKED>/cloud-environment/pulls/53
/usr/bin/docker run --name cd98f2d391664c89949c7b1f07fd4e4aada07_db75b3 --label 4cd98f --workdir /github/workspace --rm -e INPUT_PRBODY -e INPUT_PRURL -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_RUN_ATTEMPT -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_REF_NAME -e GITHUB_REF_PROTECTED -e GITHUB_REF_TYPE -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_ACTION_REPOSITORY -e GITHUB_ACTION_REF -e GITHUB_PATH -e GITHUB_ENV -e GITHUB_STEP_SUMMARY -e RUNNER_OS -e RUNNER_ARCH -e RUNNER_NAME -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/cloud-environment/cloud-environment":"/github/workspace" 4cd98f:2d391664c89949c7b1f07fd4e4aada07
Fixes #52 
Description of the PR content:
Added SNS support for AWS backup such that, if a backup job fails, an email will be sent to the eng team 
https://api.github.com/repos/<MASKED>/cloud-environment/pulls/53
52
https://github.com/<MASKED>/cloud-environment/issues/52
Invalid Response Code obtained - error code: 404
Valid flag is: 0
@RonenYAtZenity
Copy link
Author

It seems that the issue is related to the security context that the request is running in. The action gets 404 for every request it send to private repo. It seems that the action should receive the GITHUB_TOKEN and use it in order to avoid the 404 for existing issues,

@HarshCasper
Copy link
Owner

Hi @RonenYAtZenity 👋

Apologies for the late response — Yes, it should ideally receive a GITHUB_TOKEN. The action scraps the GitHub PR body to make sure that it contains an issue. Please give me sometime to find a way to use GH CLI to make that happen instead.

@tobiasmuehl
Copy link

How about this GH CLI?

https://cli.github.com/manual/gh_issue_view

@Ismoh
Copy link
Contributor

Ismoh commented Oct 14, 2022

@RonenYAtZenity Which trigger do you use?
pull_request ?
Try pull_request_target and see if this will help.

@Ismoh
Copy link
Contributor

Ismoh commented Jan 2, 2023

@RonenYAtZenity is it fixed now?
Close the issue then?

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

No branches or pull requests

4 participants