-
Notifications
You must be signed in to change notification settings - Fork 81
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
422: Validation Failed while using manual approval task in GitHub actions #7
Comments
Thanks for opening this issue! Is the target repository and corresponding workflow run public? |
They are private |
Does this consistently happen with the same repo? Or does it not happen every time the workflow runs? Are you able to repro this outside of this repro? Also, what runner are you using? A GitHub-hosted runner or self-hosted? |
It never worked in the client's organizational repository, but the same is working under my repository (the entire workflow). We are using a Github-hosted runner with Ubuntu as the operating system. |
Ok thanks for the info. I'll try to repro this in an org repo. |
@trstringer Any update on this issue? |
I was unable to repro this in a private org repo. What are the repo settings for actions? In the repo, go to Settings -> Actions -> General. Can you tell me the selections for the following?
I don't think it's workflow permissions, though, because if I set that to read only I get a failure but the HTTP response code is 403, not 422. |
I just created a new release (v1.3.0) which includes debug logging for issue creation. Can you rerun this action? You should now see some important output (such as issue body and title) that can help further debug this problem. Can you run that and share the output (redacting any sensitive data)? |
@trstringer Here's the screenshot for actions and workflow permissions. We ran the pipeline again and the issue is still the same but with more information as you said. Here are the logs from the task in actions workflow: /usr/bin/docker run --name ghcriotrstringermanualapproval140_07cc16 --label 08450d --workdir /github/workspace --rm -e pat_token -e INPUT_SECRET -e INPUT_APPROVERS -e INPUT_MINIMUM-APPROVALS -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/xxxxxxxxxxxxxxxx":"/github/workspace" ghcr.io/trstringer/manual-approval:1.4.0 Required approvers: [saikrishna-snp apeechara-nacha] Respond "approved", "approve", "lgtm", "yes" to continue workflow or "denied", "deny", "no" to cancel. |
Did you copy/paste that directly? Can you validate that? The
Can you confirm that is the actual |
It's a copy/paste error. here's the title from Raw logs Title: Manual approval required for workflow run 2392744066 |
@trstringer Any insights on this issue? |
422 Validation Failed [{Resource:Issue Field:assignees Code:invalid Message:}] |
@jniltinho, are you getting this same error? If so, can you share the log output from the action? @saikrishna-snp, I think now the next step is for me to add a form of debug logging so that we can get additional information on this request. |
Yes, I was getting the same error, as I have more users in the project, but they weren't participating in the project, I just put it for my user who owns the repo, that way it worked. |
Ah great!! Thank you for the fix! I'll get this documented in this project. @saikrishna-snp, can you take a look at @jniltinho's fix above and see if that works for you? |
@trstringer Great project !!! |
@jniltinho, thank you!!! |
@trstringer I love Golang, I will fork your project so I learn more and can in the future send my PRs for the project!!! |
If a required approver does not have the ability to be an approver in the repository then when running this action you could receive an HTTP/402 Validation Failed error. This change documents this behavior. Closes #7.
If a required approver does not have the ability to be an approver in the repository then when running this action you could receive an HTTP/402 Validation Failed error. This change documents this behavior. Closes #7.
I am getting 422 validation failed error while manual-approval task is getting executed as part of my workflow. This is not happening on my personal organizational repository.
Here's the error from workflow execution:
/usr/bin/docker run --name ghcriotrstringermanualapproval120_1e2292 --label 08450d --workdir /github/workspace --rm -e pat_token -e INPUT_SECRET -e INPUT_APPROVERS -e INPUT_MINIMUM-APPROVALS -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/xxxxxxxxxxx":"/github/workspace" ghcr.io/trstringer/manual-approval:1.2.0
Required approvers: saikrishna-snp, apeechara-nacha
error creating issue: POST https://api.github.com/repos/xxxxxxx/xxxxxxxx/issues: 422 Validation Failed [{Resource:Issue Field:assignees Code:invalid Message:}]
The text was updated successfully, but these errors were encountered: