{"id":16830339,"url":"https://github.com/glensc/gitlab-webhook-listener-bot","last_synced_at":"2026-03-27T04:56:49.662Z","repository":{"id":184889771,"uuid":"672635420","full_name":"glensc/gitlab-webhook-listener-bot","owner":"glensc","description":"Gitlab WebHook Listener Bot","archived":false,"fork":false,"pushed_at":"2024-10-29T18:16:33.000Z","size":529,"stargazers_count":2,"open_issues_count":12,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-29T20:23:56.651Z","etag":null,"topics":["git","gitlab","hook","listener","webhook"],"latest_commit_sha":null,"homepage":"","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/glensc.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-07-30T18:42:49.000Z","updated_at":"2024-09-02T18:09:45.000Z","dependencies_parsed_at":"2023-10-11T23:16:38.939Z","dependency_job_id":"d35998d1-9689-4fdc-aeff-3d27dd1f5d0a","html_url":"https://github.com/glensc/gitlab-webhook-listener-bot","commit_stats":null,"previous_names":["glensc/gitlab-webhook-listener-bot"],"tags_count":56,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glensc%2Fgitlab-webhook-listener-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glensc%2Fgitlab-webhook-listener-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glensc%2Fgitlab-webhook-listener-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/glensc%2Fgitlab-webhook-listener-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/glensc","download_url":"https://codeload.github.com/glensc/gitlab-webhook-listener-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244181415,"owners_count":20411603,"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":["git","gitlab","hook","listener","webhook"],"created_at":"2024-10-13T11:38:20.581Z","updated_at":"2026-03-27T04:56:49.611Z","avatar_url":"https://github.com/glensc.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gitlab WebHook Listener Bot\n\nThis project will listen for GitLab webhook events,\nand do actions based on context.\n\n- https://docs.gitlab.com/ee/user/project/integrations/webhooks.html\n- https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html\n\nThe project acts as a building block for you to create your own handlers.\n\n## Example\n\nThis will execute code to re-run renovate bot if the `[x]` check is checked.\n\n```ts\nimport { main, logger, MergeRequestHandler } from \"gitlab-webhook-listener-bot\";\n\nclass RenovateRebase extends MergeRequestHandler {\n  public async handle(payload: MergeRequestPayload): Promise\u003cvoid\u003e {\n    this.logger.debug(\"Renovate bot wants rebase\");\n    // TODO: create pipeline\n    // code here to do the actual action\n  }\n\n  /**\n   * Must be an opened mr whose status is updated\n   * and branch is renovate branch\n   * and rebase checkbox is checked.\n   */\n  public isValid(payload: MergeRequestPayload): boolean {\n    const {\n      object_attributes: {\n        source_branch,\n        action,\n        state,\n      },\n      changes: {\n        description,\n      },\n    } = payload;\n\n    return (\n      state === \"opened\" \u0026\u0026\n      action === \"update\" \u0026\u0026\n      source_branch.startsWith(\"renovate/\") \u0026\u0026\n      (description?.current || \"\").includes(\"[x] \u003c!-- rebase-check --\u003e\")\n    );\n  }\n}\n\nmain({\n  logger,\n  handlers: [\n    new RenovateRebase(logger),\n  ],\n});\n```\n\n## Demo\n\nThere's standalone project that you can copy and start your own project from it:\n- [demo/](demo)\n\n## Similar projects\n\n- https://github.com/kolomiichenko/gitlab-webhooker - write callbacks as handlers. unmaintained.\n- https://github.com/nanoy42/gitlab-webhook-telegram - sends events to telegram.\n- https://github.com/glensc/gitlab-registry-cleanup-hook - deletes related docker images on merge\n- https://gidgetlab.readthedocs.io - a similar project providing a Python framework for GitLab API and webhooks\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglensc%2Fgitlab-webhook-listener-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fglensc%2Fgitlab-webhook-listener-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fglensc%2Fgitlab-webhook-listener-bot/lists"}