{"id":15048147,"url":"https://github.com/github/github-event-mirror-azure-function","last_synced_at":"2025-10-19T22:32:50.491Z","repository":{"id":220560930,"uuid":"733425158","full_name":"github/github-event-mirror-azure-function","owner":"github","description":"Mirror GitHub events back to their originating repo to trigger Actions workflows, using this Azure Function","archived":false,"fork":false,"pushed_at":"2024-12-18T08:57:00.000Z","size":680,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-30T07:42:39.510Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/github.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-19T09:52:23.000Z","updated_at":"2025-01-09T20:00:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"98775ea0-98d6-42f3-9b4b-6e4962c92a3c","html_url":"https://github.com/github/github-event-mirror-azure-function","commit_stats":null,"previous_names":["github/github-event-mirror-azure-function"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgithub-event-mirror-azure-function","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgithub-event-mirror-azure-function/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgithub-event-mirror-azure-function/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/github%2Fgithub-event-mirror-azure-function/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/github","download_url":"https://codeload.github.com/github/github-event-mirror-azure-function/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237224901,"owners_count":19275107,"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":[],"created_at":"2024-09-24T21:08:45.706Z","updated_at":"2025-10-19T22:32:50.016Z","avatar_url":"https://github.com/github.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# GitHub Azure Function to mirror GitHub repository events\n\n\u003e ℹ️ This is an _unofficial_ tool created by Field Security Services, and is not officially supported by GitHub.\n\nThis Azure Function mirrors GitHub events back to a GitHub repo as a `repository_dispatch` event.\n\nThis is necessary since not all [GitHub events](https://docs.github.com/en/enterprise-cloud@latest/webhooks/webhook-events-and-payloads) can [trigger an Actions workflow](https://docs.github.com/en/enterprise-cloud@latest/actions/using-workflows/events-that-trigger-workflows). For example, the `pull_request_review` event cannot trigger a workflow.\n\n\u003e ⚠️ Some repository events can contain sensitive information. See more in \"Security Considerations\" below.\n\nIt needs you to deploy the function on Azure, and to create a GitHub App and install it on an org or repo.\n\n\u003e ℹ️ This is an _unofficial_ tool created by Field Security Services, and is not officially supported by GitHub.\n\n## How it works\n\nThe Azure Function is triggered by a GitHub webhook event, via the GitHub App. The Function sends a `repository_dispatch` event to the GitHub repo, with the same payload as the original event.\n\n```mermaid\nsequenceDiagram\n    participant GA as GitHub App\n    participant AF as Azure Function\n    participant GR as GitHub Repo\n    participant AW as Actions Workflow\n    GR-\u003e\u003eGA: GitHub event\n    GA-\u003e\u003eAF: Triggers Azure Function via webhook\n    AF-\u003e\u003eGR: Sends `repository_dispatch` event\n    GR-\u003e\u003eAW: Triggers GitHub Actions workflow\n```\n\n## Requirements\n\n- an Azure account on an Azure subscription\n- a GitHub account\n\n## Filter events\n\nBefore you deploy, you can choose to set a declarative filter to apply to GitHub events you receive in the Azure Functions App. This is in addition to selecting the events you choose to listen for in the GitHub App.\n\nThis is done in the `fiter.yml` file, with the format shown in `filter.yml.example` and below:\n\n```yaml\n# Path: filter.yml\n\n# filter webhook events by type and payload, declaratively\n\ninclude:\n  secret_scanning_alert:\n    action: [created, dismissed, resolved, reopened]\n\nexclude:\n  secret_scanning_alert:\n    action: reopened\n  secret_scanning_alert_location:\n\n```\n\nThe corresponding exclude filter for an event name is applied after the include filter.\n\nThis example will include any event named `secret_scanning_alert` with an action of `created`, `dismissed`, or `resolved`, `reopened` and will exclude any event named `secret_scanning_alert` with an action of `reopened`. It will also exclude any event named `secret_scanning_alert_location`.\n\nThe presence of an include filter here means that excluding `secret_scanning_alert_location` is redundant, as it will never be included in the first place, but it is included to show the syntax.\n\nIf you do not want to use a filter, you can delete the `filter.yml` file, or leave it empty.\n\nYou do not need to provide both an `include` and `exclude` key.\n\n\n## Installing\n\nSee [INSTALL.md](INSTALL.md) for details.\n\n## Create a GitHub Actions workflow\n\nOnce the mirror is set up and working, you need to create a GitHub Actions workflow that will run in response to a `repository_dispatch` event.\n\nIt should trigger like so:\n\n```yaml\non:\n  repository_dispatch:\n    types: [...]\n```\n\nwhere `types` is a list of the types of GitHub events you want to trigger the workflow.\n\nThe content of the event will be available in the `github.event` context variable, and the payload will be available at `github.event.client_payload`.\n\n## License\n\nThis project is licensed under the terms of the MIT open source license. Please refer to the [LICENSE](LICENSE) for the full terms.\n\n## Maintainers\n\nSee [CODEOWNERS](CODEOWNERS) for the list of maintainers.\n\n## Support\n\n\u003e ℹ️ This is an _unofficial_ tool created by Field Security Services, and is not officially supported by GitHub.\n\nSee the [SUPPORT](SUPPORT.md) file.\n\n## Security Considerations\n\nSome GitHub repository events contain sensitive data that is usually only available to users with privileged access on a repository.\n\nIf you use this event mirror, then _anyone with repository write access_ can create a workflow that will be triggered by the events you mirror, which means they will also get full access to the content of that event.\n\nTo repeat: some events can contain sensitive information. Consider carefully whether to allow access to _anyone with write access_ the ability to read an event before you mirror it back to the repository.\n\n## Background\n\nSee the [CHANGELOG](CHANGELOG.md), [CONTRIBUTING](CONTRIBUTING.md), [SECURITY](SECURITY.md), [SUPPORT](SUPPORT.md), [CODE OF CONDUCT](CODE_OF_CONDUCT.md) and [PRIVACY](PRIVACY.md) files for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fgithub-event-mirror-azure-function","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgithub%2Fgithub-event-mirror-azure-function","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgithub%2Fgithub-event-mirror-azure-function/lists"}