[Schema Inaccuracy] Create a deployment branch not listing defaults & required.

Đang mở
#3,841 4 bình luận 0 reaction 1 người được giao Xem trên GitHub

@nickfloyd đang làm issue này rồi.

Từ ngày 6/11/2025.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

feature

Schema Inaccuracy

https://docs.github.com/en/rest/deployments/branch-policies?apiVersion=2022-11-28#create-a-deployment-branch-policy

Incorret request & response.

Expected

  • Description of the type parameter when absent to default to branch.
  • Response to list id, node_id, name and type as required so that they are not emitted as type | 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.

Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
1.6k
Fork
342
Merge trung bình
3 giờ 33 phút
Pull request đã merge (30 ngày)
51

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của github/rest-api-description

Tất cả issue của github/rest-api-description

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.