-
Notifications
You must be signed in to change notification settings - Fork 61
Open
Labels
Type: DocumentationImprovements or additions to documentationImprovements or additions to documentationType: SupportAny questions, information, or general needs around the SDK or GitHub APIsAny questions, information, or general needs around the SDK or GitHub APIs
Description
Hey, just wondering how JSON is supposed to be sent?
Tried a few things but getting different errors back.
This is the API request I'm trying https://docs.github.com/en/rest/reference/issues#create-a-label
steps:
- uses: octokit/request-action@v2.x
with:
route: POST /repos/${{ github.repository }}/labels
body: "'\\'{\"name\":\"React ${{ github.event.ref }}\"}\\''"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}Error: end of the stream or a document separator is expected (1:4)
1 | '\'{"name":"React aarontwf-patch-2"}\''
--------^
body: "''{\"name\":\"React ${{ github.event.ref }}\"}''"Error: end of the stream or a document separator is expected (1:3)
1 | ''{"name":"React aarontwf-patch-1"}''
-------^
body: "'{\"name\":\"React ${{ github.event.ref }}\"}'"Error: Invalid request.
"name" wasn't supplied.
body: '{"name":"React ${{ github.event.ref }}"}'Error: Invalid request.
"name" wasn't supplied.
dsoegijono
Metadata
Metadata
Assignees
Labels
Type: DocumentationImprovements or additions to documentationImprovements or additions to documentationType: SupportAny questions, information, or general needs around the SDK or GitHub APIsAny questions, information, or general needs around the SDK or GitHub APIs
Type
Projects
Status
🔥 Backlog