{"id":13825846,"url":"https://github.com/octokit/request-action","last_synced_at":"2025-06-16T20:09:06.971Z","repository":{"id":38175611,"uuid":"213507602","full_name":"octokit/request-action","owner":"octokit","description":"A GitHub Action to send arbitrary requests to GitHub's REST API","archived":false,"fork":false,"pushed_at":"2025-05-20T07:38:15.000Z","size":3130,"stargazers_count":399,"open_issues_count":14,"forks_count":59,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-06-07T16:08:20.747Z","etag":null,"topics":["hacktoberfest","octokit-js","rest-api","tooling"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/GitHub-API-Request","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/octokit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-10-07T23:45:28.000Z","updated_at":"2025-06-06T09:25:01.000Z","dependencies_parsed_at":"2023-09-28T00:25:44.219Z","dependency_job_id":"6325ea1f-b11f-4c54-955c-d93230d4c14b","html_url":"https://github.com/octokit/request-action","commit_stats":{"total_commits":329,"total_committers":25,"mean_commits":13.16,"dds":0.5714285714285714,"last_synced_commit":"786351db496fa66730d8faa09ef279108da175a3"},"previous_names":[],"tags_count":46,"template":false,"template_full_name":null,"purl":"pkg:github/octokit/request-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octokit%2Frequest-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octokit%2Frequest-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octokit%2Frequest-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octokit%2Frequest-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/octokit","download_url":"https://codeload.github.com/octokit/request-action/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/octokit%2Frequest-action/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260230731,"owners_count":22978177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","octokit-js","rest-api","tooling"],"created_at":"2024-08-04T09:01:27.915Z","updated_at":"2025-06-16T20:09:06.952Z","avatar_url":"https://github.com/octokit.png","language":"JavaScript","funding_links":[],"categories":["JavaScript"],"sub_categories":[],"readme":"# Octokit Request Action\n\n\u003e A GitHub Action to send arbitrary requests to GitHub's REST API\n\n[![Build Status](https://github.com/octokit/request-action/workflows/Test/badge.svg)](https://github.com/octokit/request-action/actions)\n\n## Usage\n\nMinimal example\n\n```yml\nname: Log latest release\non:\n  push:\n    branches:\n      - main\n\njobs:\n  logLatestRelease:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: octokit/request-action@v2.x\n        id: get_latest_release\n        with:\n          route: GET /repos/{owner}/{repo}/releases/latest\n          owner: octokit\n          repo: request-action\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      - run: \"echo latest release: '${{ steps.get_latest_release.outputs.data }}'\"\n```\n\nMore complex examples involving `POST`, setting custom media types, and parsing output data\n\n```yml\nname: Check run\non:\n  push:\n    branches:\n      - main\n\njobs:\n  create-file:\n    runs-on: ubuntu-latest\n    steps:\n      # Create check run\n      - uses: octokit/request-action@v2.x\n        id: create_check_run\n        with:\n          route: POST /repos/{owner}/{repo}/check-runs\n          owner: octokit\n          repo: request-action\n          name: \"Test check run\"\n          head_sha: ${{ github.sha }}\n          output: | # The | is significant!\n            title: Test check run title\n            summary: A summary of the test check run\n            images:\n              - alt: Test image\n                image_url: https://octodex.github.com/images/jetpacktocat.png\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      # Download file\n      - uses: octokit/request-action@v2.x\n        id: download_file\n        with:\n          route: GET /repos/OWNER/REPO/contents/README.md\n          owner: octokit\n          repo: request-action\n          mediaType: | # The | is significant!\n            format: raw\n         env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      # Update check run to completed, successful status\n      - uses: octokit/request-action@v2.x\n        id: update_check_run\n        with:\n          route: PATCH /repos/{owner}/{repo}/check-runs/{check_run_id}\n          owner: octokit\n          repo: request-action\n          check_run_id: ${{ fromJson(steps.create_check_run.outputs.data).id }}\n          conclusion: \"success\"\n          status: \"completed\"\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\nHandle errors\n\n```yml\nname: Log latest release\non:\n  push:\n    branches:\n      - main\n\njobs:\n  handleError:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: octokit/request-action@v2.x\n        id: get_release\n        with:\n          route: GET /repos/{owner}/{repo}/releases/v0.9.9\n          owner: octokit\n          repo: request-action\n        env:\n          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n      - run: \"echo Release found: '${{ steps.get_release.outputs.data }}'\"\n      - run: \"echo Release could not be found. Request failed with status '${{ steps.get_release.outputs.status }}'\"\n        if: ${{ failure() }}\n```\n\n## Inputs\n\nTo use request body parameters, simply pass in an `input` matching the parameter name. See previous examples.\n\nDue to how request parameters are processed, it may be necessary in some cases to first encode the value as either JSON or a block scalar:\n\n```yml\nenv:\n  REQUEST_BODY: |\n    Multi-line string with *special* characters:\n    - \"'`\nwith:\n  # As JSON\n  body: ${{ toJSON(env.REQUEST_BODY) }}\n\n  # As block scalar\n  body: |\n    |\n    ${{ env.REQUEST_BODY }}\n```\n\n## Debugging\n\nTo see additional debug logs, create a secret with the name: `ACTIONS_STEP_DEBUG` and value `true`.\n\n## How it works\n\n`octokit/request-action` is using [`@octokit/request`](https://github.com/octokit/request.js/) internally with the addition\nthat requests are automatically authenticated using the `GITHUB_TOKEN` environment variable. It is required to prevent rate limiting, as all anonymous requests from the same origin count against the same low rate.\n\nThe actions sets `data` output to the response data. The action also sets the `headers` (again, to a JSON string) and `status` output properties.\n\nTo access deep values of `outputs.data` and `outputs.headers`, check out the [fromJson](https://help.github.com/en/actions/reference/context-and-expression-syntax-for-github-actions#fromjson) function.\n\n## Warnings\n\nThe GitHub Actions runners are currently showing warnings when using this action that look like:\n\n```\n##[warning]Unexpected input 'repository', valid inputs are ['route', 'mediaType']\n```\n\nThe reason for this warning is because the `repository` key is not listed as a possible value in `actions.yml`. This warning will appear for any key used under the `with` except `route` and `mediaType`. Due to the flexible nature of the required inputs depending on the `route`, not all of the possible parameters can be listed in `actions.yml`, so you will see this warning under normal usage of the action. As long as you see a 200 response code at the bottom of the output, everything should have worked properly and you can ignore the warnings. The response code will appear at the bottom of the output from the action and looks like:\n\n```\n\u003c 200 451ms\n```\n\nSee [Issue #26](https://github.com/octokit/request-action/issues/26) for more information.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctokit%2Frequest-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foctokit%2Frequest-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foctokit%2Frequest-action/lists"}