Create branch protection rule error from curl #24678
-
I am trying to create a branch protection rule using cURL command in a manually dispatched GitHub workflow, but it always fails with “Problem parsing JSON” error. Same request works from Postman. Curl command to make the request body along with headers values.
release_rule_file.txt file is generated using cat command to preserve formatting:
repo_id required for GraphQL API is base_64 encoded value retrieved from get repo REST API:
I have verified the same header values are set in Postman except for “User-Agent” and “Cache-Control” headers. I am using GitHub Enterprise server 3.2.1. Please help. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Resolved it by using |
Beta Was this translation helpful? Give feedback.
Resolved it by using
octokit/graphql-action
instead of cURL