[BUG]: [Create Review] 422: Unprocessable Entity: Review comments is invalid and Review threads is invalid
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- github, github-actions, typescript
Hướng nghiên cứu
Start with the Create a review API documentation linked in the issue and compare the first and second request payloads in the provided log. Reproduce the batched requests using actions/github-script v6, then determine whether the failure is caused by a documented comments limit, request validation, rate limiting, or spam protection.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
What happened?
Use Case,
I'm using Create review PR API to create PR comments by sending multiple comments as array in single request input field
comments. It works as expected.
Issue,
When I tried to split single request Create review PR API into multiple requests by limiting
commentsinput batch array of 20 comments per API call then it succeeds for first batch but second batch request fails with error "422: Unprocessable Entity: Review comments is invalid and Review threads is invalid"
Failed response status,
422
Validation failed, or the endpoint has been spammed.
Limitation?
Do we have any maximum number/length/character limitation for
commentsarray in single request Create review PR API input fieldcomments
Root Cause?
Why issue happens only for multiple requests to Create review PR API? Is that due to rate limiting/spam issues for endpoint?
Versions
actions/github-script@v6, octokit-core.js/3.6.0, Node.js/16.13.0 (linux; x64)
Relevant log output
RequestError [HttpError]: Unprocessable Entity: "Review comments is invalid and Review threads is invalid"
at /runner/_work/_actions/actions/github-script/v6/dist/index.js:6172:21
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
status: 422,
response: {
url: 'https://api.github.com/repos/{ORG}/{REPO}/pulls/{PR}/reviews',
status: 422,
headers: {
'access-control-allow-origin': '*',
'access-control-expose-headers': 'ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset',
connection: 'close',
Error: Unhandled error: HttpError: Unprocessable Entity: "Review comments is invalid and Review threads is invalid"
'content-length': '206',
'content-security-policy': "default-src 'none'",
'content-type': 'application/json; charset=utf-8',
date: 'Wed, 21 Dec 2022 07:14:45 GMT',
'referrer-policy': 'origin-when-cross-origin, strict-origin-when-cross-origin',
server: 'GitHub.com',
'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
vary: 'Accept-Encoding, Accept, X-Requested-With',
'x-accepted-oauth-scopes': '',
'x-content-type-options': 'nosniff',
'x-frame-options': 'deny',
'x-github-api-version-selected': '2022-11-28',
'x-github-media-type': 'github.v3',
'x-github-request-id': 'FDAD:1CB0:FEC18:12B194:63A2B260',
'x-oauth-scopes': 'repo',
'x-ratelimit-limit': '5000',
'x-ratelimit-remaining': '4819',
'x-ratelimit-reset': '1671608480',
'x-ratelimit-resource': 'core',
'x-ratelimit-used': '181',
'x-xss-protection': '0'
},
data: {
message: 'Unprocessable Entity',
errors: [Array],
documentation_url: 'https://docs.github.com/rest/reference/pulls#create-a-review-for-a-pull-request'
}
},
request: {
method: 'POST',
url: 'https://api.github.com/repos/{ORG}/{REPO}/pulls/{PR}/reviews',
headers: {
accept: 'application/vnd.github.-preview+json',
'user-agent': 'actions/github-script octokit-core.js/3.6.0 Node.js/16.13.0 (linux; x64)',
authorization: 'token [REDACTED]',
'content-type': 'application/json; charset=utf-8'
},
body: '{"event":"COMMENT","commit_id":"a6f6058f93f6bc119324e4824248d6206d087b86","comments":[{COMMENTS_ARR}]}',
request: { agent: [Agent], hook: [Function: bound bound register] }
}
}
- Ngôn ngữ chính
- TypeScript
- Star
- 5k
- Fork
- 586
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của actions/github-script
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
actions/github-script#728 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
actions/github-script#727 · 1 reaction ·
-
{ Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 10/100
actions/github-script#724 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
actions/github-script#723 · 1 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
actions/github-script#714 · 1 bình luận · 4 reaction ·
Tất cả issue của actions/github-script
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
bug v2
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
modelcontextprotocol/inspector#2458 · 1 bình luận ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
carbon-design-system/ibm-products#9907 ·