{"id":18537640,"url":"https://github.com/actionsflow/webhook2github","last_synced_at":"2025-10-07T17:52:45.516Z","repository":{"id":110853916,"uuid":"299749047","full_name":"actionsflow/webhook2github","owner":"actionsflow","description":"Forward webhook to github repository_dispatch event","archived":false,"fork":false,"pushed_at":"2022-01-24T11:32:35.000Z","size":229,"stargazers_count":12,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T09:04:17.459Z","etag":null,"topics":["github","webhook","workflows"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/actionsflow.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE_APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-29T22:08:57.000Z","updated_at":"2024-08-17T12:04:56.000Z","dependencies_parsed_at":null,"dependency_job_id":"19937849-80ec-481b-a8ef-8ac1de4d8122","html_url":"https://github.com/actionsflow/webhook2github","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionsflow%2Fwebhook2github","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionsflow%2Fwebhook2github/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionsflow%2Fwebhook2github/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/actionsflow%2Fwebhook2github/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/actionsflow","download_url":"https://codeload.github.com/actionsflow/webhook2github/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248078300,"owners_count":21044084,"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":["github","webhook","workflows"],"created_at":"2024-11-06T19:39:25.366Z","updated_at":"2025-10-07T17:52:40.479Z","avatar_url":"https://github.com/actionsflow.png","language":"TypeScript","readme":"# webhook2github\r\n\r\nThis API enables forward webhook requests to [github repository_dispatch event webhook](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#repository_dispatch).\r\n\r\nAPI Endpoint: [`https://webhook.actionsflow.workers.dev/`](https://webhook.actionsflow.workers.dev/)\r\n\r\n## Usage \u003ca name = \"usage\"\u003e\u003c/a\u003e\r\n\r\n```bash\r\nhttps://webhook.actionsflow.workers.dev/\u003cowner\u003e/\u003crepo\u003e/\u003cyour-path\u003e?__token=\u003cyour-github-personal-token\u003e\r\n```\r\n\r\nThe default response of the webhook will use [the github `create-a-repository-dispatch-event` API response](https://docs.github.com/en/rest/reference/repos#create-a-repository-dispatch-event). You can use search params `__response_code`, `__response_content_type`, `__response_body` to specify a custom response.\r\n\r\nYou can also use headers `X-Github-Authorization` instead of search params `__token` for more security.\r\n\r\nThe webhook also supports the cross-origin resource sharing request.\r\n\r\nFor example:\r\n\r\n```bash\r\ncurl --request POST 'https://webhook.actionsflow.workers.dev/actionsflow/webhook2github/webhook/webhook?__token=\u003cyour-github-personal-token\u003e' \\\r\n--header 'Content-Type: application/json' \\\r\n--data-raw '{\r\n    \"key\": \"value\"\r\n}'\r\n```\r\n\r\nSpecify response code example:\r\n\r\n```bash\r\ncurl --request POST 'https://webhook.actionsflow.workers.dev/actionsflow/webhook2github/webhook/webhook?__token=\u003cyour-github-personal-token\u003e\u0026__response_code=200' \\\r\n--header 'Content-Type: application/json' \\\r\n--data-raw '{\r\n    \"key\": \"value\"\r\n}'\r\n```\r\n\r\nAn axios example:\r\n\r\n```javascript\r\nvar axios = require('axios')\r\nvar data = JSON.stringify({ key: 'value' })\r\n\r\nvar config = {\r\n  method: 'post',\r\n  url:\r\n    'https://webhook.actionsflow.workers.dev/actionsflow/webhook2github/webhook/webhook?__token=\u003cyour-github-personal-token\u003e',\r\n\r\n  data: data,\r\n}\r\n\r\naxios(config)\r\n  .then(function (response) {\r\n    console.log(JSON.stringify(response.data))\r\n  })\r\n  .catch(function (error) {\r\n    console.log(error)\r\n  })\r\n```\r\n\r\n## How It Works\r\n\r\nThis API will forward the following original webhook request:\r\n\r\n```bash\r\nhttps://webhook.actionsflow.workers.dev/\u003cowner\u003e/\u003crepo\u003e/\u003cyour-path\u003e?__token=\u003cyour-github-personal-token\u003e\r\n```\r\n\r\nTo `https://api.github.com/repos/\u003cowner\u003e/\u003crepo\u003e/dispatches`, with body:\r\n\r\n```json\r\n{\r\n  \"event_type\": \"webhook\",\r\n  \"client_payload\": {\r\n    \"path\": \"\u003cyour-path\u003e\",\r\n    \"method\": \"\u003crequest.method\u003e\",\r\n    \"headers\": \"\u003crequest.headers\u003e\",\r\n    \"body\": \"\u003crequest body\u003e\"\r\n  }\r\n}\r\n```\r\n\r\nSo Github actions will be triggered with `repository_dispatch` event.\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factionsflow%2Fwebhook2github","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Factionsflow%2Fwebhook2github","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Factionsflow%2Fwebhook2github/lists"}