Open
Description
Schema Inaccuracy
Incorret request & response.
Expected
- Description of the
type
parameter when absent to default tobranch
. - Response to list
id
,node_id
,name
andtype
as required so that they are not emitted astype | undefined
in JS.
Reproduction Steps
Execute
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/OWNER/REPO/environments/ENVIRONMENT_NAME/deployment-branch-policies \
-f "name=release/*"
Yields
{
"id": 20029356,
"node_id": "MDE2OkdhdGVCcmFuY2hQb2xpY3kyMDAyOTM1Ng==",
"name": "release/*",
"type": "branch"
}
So omitting type
creates a type
= branch
. Equally there is no way to create a deployment branch policy and not get back and id
, node_id
, name
and a type
.