-
-
Notifications
You must be signed in to change notification settings - Fork 36
Closed
Description
Describe the bug
While the specific step has continue-on-error: true, there's a step that's throwing an error when adding the label:
No subschema in "anyOf" matched.
For 'anyOf/0', {"labels[]" => "tf:plan"} is not an array.
For 'anyOf/1', {"labels[]" => "tf:plan"} is not an array.
"labels[]" is not a permitted key.
"labels" wasn't supplied. (HTTP 422)
{"id":8236179416,"node_id":"LA_kwDOK2Hw688AAAAB6uof2A","url":"https://api.github.com/repos/xyz/yyy/labels/tf:plan","name":"tf:plan","color":"76D603","default":false,"description":"Pull requests that plan TF code."}{"message":"Invalid request.\n\nNo subschema in \"anyOf\" matched.\nFor 'anyOf/0', {\"labels[]\" => \"tf:plan\"} is not an array.\nFor 'anyOf/1', {\"labels[]\" => \"tf:plan\"} is not an array.\n\"labels[]\" is not a permitted key.\n\"labels\" wasn't supplied.","documentation_url":"https://docs.github.com/rest/issues/labels#add-labels-to-an-issue","status":"422"}
I think this is related to one of the calls not having the right quoting? I'm still working on a fix - opened the PR prematurely, but converted to draft mode until I can fix it.
To Reproduce
- plan a PR
Expected behavior
Screenshots
Additional context
% GH_PAGER='' gh api /repos/xyz/yyy/issues/245/labels --header "X-GitHub-Api-Version:2022-11-28" --method POST --field "labels=tf:plan"
{
"message": "Invalid request.\n\nNo subschema in \"anyOf\" matched.\nFor 'anyOf/0', {\"labels\" => \"tf:plan\"} is not an array.\nFor 'anyOf/1', {\"labels\" => \"tf:plan\"} is not an array.\nFor 'properties/labels', \"tf:plan\" is not an array.",
"documentation_url": "https://docs.github.com/rest/issues/labels#add-labels-to-an-issue",
"status": "422"
}
gh: Invalid request.
No subschema in "anyOf" matched.
For 'anyOf/0', {"labels" => "tf:plan"} is not an array.
For 'anyOf/1', {"labels" => "tf:plan"} is not an array.
For 'properties/labels', "tf:plan" is not an array. (HTTP 422)
vs. this
% GH_PAGER='' gh api /repos/xyz/yyy/issues/245/labels --header "X-GitHub-Api-Version:2022-11-28" --method POST --field "labels[]=tf:plan"
works as expected
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels