{"id":26834060,"url":"https://github.com/sugiruu/go-mantis-webhook","last_synced_at":"2025-03-30T15:45:08.076Z","repository":{"id":143664842,"uuid":"132556484","full_name":"sugiruu/go-mantis-webhook","owner":"sugiruu","description":"Webhook integration Gitlab -\u003e Mantisbt","archived":false,"fork":false,"pushed_at":"2018-05-24T23:42:22.000Z","size":86,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-25T12:15:59.229Z","etag":null,"topics":["mantis","webhook"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sugiruu.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":"2018-05-08T05:04:59.000Z","updated_at":"2018-05-23T23:51:25.000Z","dependencies_parsed_at":"2024-01-22T17:38:33.135Z","dependency_job_id":null,"html_url":"https://github.com/sugiruu/go-mantis-webhook","commit_stats":null,"previous_names":["sugiruu/go-mantis-webhook"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sugiruu%2Fgo-mantis-webhook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sugiruu%2Fgo-mantis-webhook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sugiruu%2Fgo-mantis-webhook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sugiruu%2Fgo-mantis-webhook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sugiruu","download_url":"https://codeload.github.com/sugiruu/go-mantis-webhook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246342765,"owners_count":20761939,"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":["mantis","webhook"],"created_at":"2025-03-30T15:45:07.542Z","updated_at":"2025-03-30T15:45:08.067Z","avatar_url":"https://github.com/sugiruu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Mantis webhook\nWebhook integration Gitlab -\u003e Mantisbt\n\nThis webhook aims to integrate Gitlab with Mantisbt by closing issues listed on a commit message.\nIt also provides some nice features like email aliasing and project mapping.\n\n# Getting started\nAll you need to run this webhook is Go (any version, but the newer the better) and a Postgresql database. You can download the prebuilt package with a docker configuration to quickly get it running.\n\nThis webhook use both soap and REST mantis apis, so make sure both of them are enabled before you continue.\n\n# Configuration\nThis is an example of `config.json` you need to create on the root directory on the webhook.\n```json\n{\n  \"port\": 8090,\n  \"secret\": \"secret_token\",\n  \"database\": {\n    \"host\": \"localhost\",\n    \"database_name\": \"go-mantis\",\n    \"user\": \"postgres\",\n    \"password\": \"postgres\"\n  },\n  \"gitlab\": {\n    \"token\": \"my_gitlab_token\"\n  },\n  \"mantis\": {\n    \"host\": \"http://localhost:8989\",\n    \"user\": \"administrator\",\n    \"password\": \"root\",\n    \"token\": \"QAei2Pozy2FHd_5fFx2Bw3SH8obe4e49\"\n  }\n}\n```\n\n# Endpoints\n\n### Webhook\nAll requests under `/webhook` are authorized by the token you set on your Gitlab repository. The webhook will check for it under the request's `X-Gitlab-Token` header and compare it with the token you set on the `config.json` under `gitlab.token`.\n\n#### POST /webhook/push\nThe endpoint you need to register on your [Gitlab repository](https://docs.gitlab.com/ee/user/project/integrations/webhooks.html).\n\n### Application\nAll requests under `/app` are authorized by the token you set on you `config.json` under `secret`. The app will check for the token under the request's `Authorization` header.\n\n#### POST /app/projects\nAssociates a new Gitlab project with a Mantis one.\n\nParams:\n```json\n{\n  \"gitlab_project\": \"test/test\",\n  \"mantis_project\": \"Test project\"\n}\n```\n\n#### POST /app/aliases\nRegisters an email alias for a Mantis user.\n\nParams:\n```json\n{\n  \"email\": \"my.mantis.email@example.com\",\n  \"alias\": \"my.other.email@example.com\"\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsugiruu%2Fgo-mantis-webhook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsugiruu%2Fgo-mantis-webhook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsugiruu%2Fgo-mantis-webhook/lists"}