diff --git a/index.js b/index.js index 83b5633..8a6fd9a 100644 --- a/index.js +++ b/index.js @@ -18,9 +18,13 @@ async function main() { // workaround for https://github.com/octokit/request-action/issues/71 // un-encode "repo" in /repos/{repo} URL when "repo" parameter is set to ${{ github.repository }} - const options = octokit.request.endpoint(route, parameters); + const { url, body, ...options } = octokit.request.endpoint( + route, + parameters + ); const requestOptions = { ...options, + data: body, url: options.url.replace( /\/repos\/([^/]+)/, (_, match) => "/repos/" + decodeURIComponent(match)