{"id":39028994,"url":"https://github.com/tanben/sample-ldwebhook-apply-changes","last_synced_at":"2026-01-17T17:36:01.304Z","repository":{"id":177432883,"uuid":"660243598","full_name":"tanben/sample-ldwebhook-apply-changes","owner":"tanben","description":"This is a poc of using LaunchDarkly webhook integration to apply approved flag changes.","archived":false,"fork":false,"pushed_at":"2024-12-23T19:13:24.000Z","size":120,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-23T20:25:27.122Z","etag":null,"topics":["feature-flags","integration","launchdarkly","rest-api","webhook"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/tanben.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-06-29T15:03:25.000Z","updated_at":"2024-12-23T19:12:21.000Z","dependencies_parsed_at":null,"dependency_job_id":"cd7d76a6-06c7-42ba-8ac1-e5f960cd3fe9","html_url":"https://github.com/tanben/sample-ldwebhook-apply-changes","commit_stats":null,"previous_names":["tanben/sample-ldwebhook-apply-changes"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/tanben/sample-ldwebhook-apply-changes","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanben%2Fsample-ldwebhook-apply-changes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanben%2Fsample-ldwebhook-apply-changes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanben%2Fsample-ldwebhook-apply-changes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanben%2Fsample-ldwebhook-apply-changes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tanben","download_url":"https://codeload.github.com/tanben/sample-ldwebhook-apply-changes/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tanben%2Fsample-ldwebhook-apply-changes/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28513511,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T13:38:16.342Z","status":"ssl_error","status_checked_at":"2026-01-17T13:37:44.060Z","response_time":85,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["feature-flags","integration","launchdarkly","rest-api","webhook"],"created_at":"2026-01-17T17:36:01.226Z","updated_at":"2026-01-17T17:36:01.293Z","avatar_url":"https://github.com/tanben.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LaunchDarkly Webhook Approval Application\n\nThis is an Express.js application that listens for webhook events from LaunchDarkly and automatically apply approved changes.\n\n## Features\n\n- Listens for webhook events from LaunchDarkly\n- Validates the incoming request using the `x-ld-signature` header and the configured `webhook_secret`\n- Checks if the webhook event is a review approval request, if the request is approved, and if there is a pending change\n- Applies the approval request using the LaunchDarkly API and the provided `access_token`\n- Logs the update status and the applied date of the change\n\n## Prerequisites\n- [LaunchDarkly account](https://launchdarkly.com/start-trial/)\n- [LD Webhook integration](https://docs.launchdarkly.com/home/connecting/webhooks)\n- [LD Access token](https://docs.launchdarkly.com/home/account-security/api-access-tokens)\n- NodeJS \u003e=16.8.x\n\n## Installation\n\n1. Clone the repository:\n\n```bash\ngit clone git@github.com:tanben/sample-ldwebhook-apply-changes.git\n```\n\n2. Install the dependencies:\n\n```bash\ncd sample-ldwebhook-apply-changes\nnpm install\n```\n\n3. Create a `.env` file in the root directory and provide the following environment variables:\n\n```\nwebhook_secret=YOUR_WEBHOOK_SECRET\naccess_token=YOUR_LAUNCHDARKLY_ACCESS_TOKEN\n```\n\nReplace `YOUR_WEBHOOK_SECRET` with the secret key configured in your LaunchDarkly webhook settings, and `YOUR_LAUNCHDARKLY_ACCESS_TOKEN` with your LaunchDarkly access token.\n\n4. Start the application:\n\n```bash\nnpm start\n```\n\nThe server will start running on `http://localhost:3000`.\n\n## Usage\n\n1. Configure your LaunchDarkly webhook to send events to `http://your-server-url/webhook`.\n\n2. When a review approval request is received and the change is approved, the application will automatically apply the approval using the LaunchDarkly API.\n\n3. The application will log the update status and the applied date of the change.\n\n## Configuration\n\n- `PORT`: The port on which the server will run (default: 3000).\n- `webhook_secret`: The secret key used to validate incoming webhook requests from LaunchDarkly.\n- `access_token`: The LaunchDarkly access token used to authenticate API requests.\n\n## Dependencies\n\n- `express`: Web framework for Node.js.\n- `body-parser`: Middleware for parsing incoming request bodies.\n- `./utils.js`: A custom module containing utility functions for handling LaunchDarkly webhook events and API requests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanben%2Fsample-ldwebhook-apply-changes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftanben%2Fsample-ldwebhook-apply-changes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftanben%2Fsample-ldwebhook-apply-changes/lists"}