【发布时间】:2022-12-26 06:03:03
【问题描述】:
我正在尝试使用接受 3 个字段的 gh api --method PUT orgs/<ORG>/actions/permissions/selected-actions:其中之一是 patterns_allowed。我尝试了多种方式来传递数据,但我总是得到
{
"message": "Invalid request.\n\nFor 'properties/patterns_allowed', \"...\" is not an array.",
"documentation_url": "https://docs.github.com/rest/reference/actions#set-allowed-actions-for-an-organization"
}
其中一项尝试如下所示:
ALLOWED="foo,bar"
gh api --method PUT \
orgs/${{github.repository_owner}}/actions/permissions/selected-actions \
--field "github_owned_allowed=true" \
--field "verified_allowed=false" \
--field "patterns_allowed=[$ALLOWED]"
传递数组类型字段的正确方法是什么?
【问题讨论】:
-
你能展示一下你现在是如何传递这些数据的吗?
-
@wkl 完成,添加到问题中
标签: github-api github-cli