Getting data from pull request

Hi, is there some functionality I can access the pull request data, like for example getting a label to switch, for example, between publishing new major release or minor version using https://github.com/actions/create-release.

One can access those data (JSON) from this url, but how can I access it from the GitHub Action? Is there some package on that?

curl -s https://api.github.com/repos/:repo/pulls/:pr_id

// https://github.com/actions/create-release/issues/5