[Schema Inaccuracy] Create a deployment branch not listing defaults & required.
@nickfloyd is already working on this.
Since Nov 6, 2025.
Assessment
This issue has not been assessed yet.
Description
Schema Inaccuracy
Incorret request & response.
Expected
- Description of the
typeparameter when absent to default tobranch. - Response to list
id,node_id,nameandtypeas required so that they are not emitted astype | undefinedin 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.
- Dominant language
- No language data
- Stars
- 1.6k
- Forks
- 342
- Avg merge
- 3h 33m
- Merged PRs (30d)
- 51
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from github/rest-api-description
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
github/rest-api-description#7201 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
github/rest-api-description#7163 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7162 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
github/rest-api-description#7135 ·
-
feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
github/rest-api-description#7111 · 1 comment ·