{"id":19680790,"url":"https://github.com/codewars/zulip-github-events","last_synced_at":"2025-02-27T06:29:30.841Z","repository":{"id":47826737,"uuid":"277385155","full_name":"codewars/zulip-github-events","owner":"codewars","description":"Simple webhook handler on Google Cloud Functions sending custom messages to Zulip for GitHub events","archived":false,"fork":false,"pushed_at":"2023-10-03T00:42:41.000Z","size":173,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-01-10T05:35:53.310Z","etag":null,"topics":["google-cloud-functions","webhook","zulip"],"latest_commit_sha":null,"homepage":"","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/codewars.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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-07-05T21:19:37.000Z","updated_at":"2021-08-12T17:23:37.000Z","dependencies_parsed_at":"2025-01-10T05:32:32.049Z","dependency_job_id":"1e954a1a-ffe7-4c9e-8772-999debe8438b","html_url":"https://github.com/codewars/zulip-github-events","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Fzulip-github-events","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Fzulip-github-events/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Fzulip-github-events/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codewars%2Fzulip-github-events/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codewars","download_url":"https://codeload.github.com/codewars/zulip-github-events/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240989459,"owners_count":19889694,"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":["google-cloud-functions","webhook","zulip"],"created_at":"2024-11-11T18:06:08.151Z","updated_at":"2025-02-27T06:29:30.797Z","avatar_url":"https://github.com/codewars.png","language":"JavaScript","readme":"# `zulipGitHubEvents`\n\nSimple webhook handler on Google Cloud Functions sending custom messages to Zulip for GitHub events.\n\nThe official [GitHub integration](https://zulipchat.com/integrations/doc/github) was too verbose for us.\n\n`zulipGitHubEvents` does the following:\n\n1. Verify the request\n2. Create custom message based on the event or ignore it\n3. Send the message to `stream` under `topic`\n\nWe only care about the following events:\n\n- `gollum`\n- `issues`\n  - `opened`\n  - `closed`\n  - `edited`\n  - `transferred`\n  - `labeled`\n  - `unlabeled`\n- `issue_comment`\n  - `created`\n  - `edited`\n  - `deleted`\n- `pull_request`\n  - `opened`\n  - `edited`\n  - `closed`\n- `pull_request_review`\n  - `submitted`\n- `pull_request_review_comment`\n  - `created`\n\n## Deploying\n\nSet environment variables:\n\n- `GITHUB_WEBHOOK_SECRET`: Secret to set when creating webhook on GitHub\n- `ZULIP_BOT_EMAIL`: Email of the Zulip bot\n- `ZULIP_BOT_API_KEY`: API key of the Zulip bot\n- `ZULIP_REALM`: Zulip URL\n- `PROJECT_ID`: Google Cloud project ID\n\nDeploy with `gcloud`:\n\n```\ngcloud functions deploy zulipGitHubEvents \\\n    --trigger-http \\\n    --allow-unauthenticated \\\n    --runtime nodejs10 \\\n    --memory 128MB \\\n    --set-env-vars GITHUB_WEBHOOK_SECRET=$GITHUB_WEBHOOK_SECRET,ZULIP_BOT_EMAIL=$ZULIP_BOT_EMAIL,ZULIP_BOT_API_KEY=$ZULIP_BOT_API_KEY,ZULIP_REALM=$ZULIP_REALM \\\n    --project $PROJECT_ID\n```\n\nConfigure GitHub Webhook:\n\n- Set `Payload URL` to `httpsTrigger.url` + `?stream=stream_name\u0026topic=topic_name`\n- Set `Content type` to `application/json`\n- Set `Secret` to `$GITHUB_WEBHOOK_SECRET`\n- Select events to trigger this webhook\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewars%2Fzulip-github-events","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodewars%2Fzulip-github-events","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodewars%2Fzulip-github-events/lists"}