octokit / request-action

A GitHub Action to send arbitrary requests to GitHub's REST API

Home Page:https://github.com/marketplace/actions/GitHub-API-Request

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to call add Tag?

pilganchuk opened this issue · comments

I'm trying to add a lightweight tag (according this doc) on my commit, but I have an error...
The action:

      - uses: octokit/request-action@v2.x
        id: push_tag
        with:
          route: POST /repos/{owner}/{repo}/git/tags
          owner: novaittestteam
          repo: ntk.mob
          body: ${{ toJSON(env.REQUEST_BODY) }}
          mediaType: |
            format: raw
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          REQUEST_BODY: |
            {"tag":"test","message":"Auto API Call","object":"4c64ded9bed5633f4918ea0284be44c4f85541c4","type":"commit","tagger":{"name":"AutoAPICall","email":"support@test.com"}}
The error:
< 422 322ms
Error: Invalid request.

"message", "object", "tag", "type" weren't supplied.

Where am I wrong? How can I see the whole response body returned from API?

👋 Hi! Thank you for this contribution! Just to let you know, our GitHub SDK team does a round of issue and PR reviews twice a week, every Monday and Friday! We have a process in place for prioritizing and responding to your input. Because you are a part of this community please feel free to comment, add to, or pick up any issues/PRs that are labled with Status: Up for grabs. You & others like you are the reason all of this works! So thank you & happy coding! 🚀