{"id":29977959,"url":"https://github.com/zc2638/review-bot","last_synced_at":"2025-08-04T11:04:14.569Z","repository":{"id":64303910,"uuid":"330534232","full_name":"zc2638/review-bot","owner":"zc2638","description":"gitlab review bot","archived":false,"fork":false,"pushed_at":"2022-05-31T09:12:48.000Z","size":1195,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-06-20T15:55:19.965Z","etag":null,"topics":["gitlab","gitlab-review","gitlab-review-bot","lgtm","review","review-bot","reviewbot","webhook"],"latest_commit_sha":null,"homepage":"","language":"Go","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/zc2638.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}},"created_at":"2021-01-18T02:30:18.000Z","updated_at":"2023-11-01T20:01:58.000Z","dependencies_parsed_at":"2023-01-15T10:00:55.470Z","dependency_job_id":null,"html_url":"https://github.com/zc2638/review-bot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/zc2638/review-bot","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zc2638%2Freview-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zc2638%2Freview-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zc2638%2Freview-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zc2638%2Freview-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zc2638","download_url":"https://codeload.github.com/zc2638/review-bot/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zc2638%2Freview-bot/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268688321,"owners_count":24291049,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["gitlab","gitlab-review","gitlab-review-bot","lgtm","review","review-bot","reviewbot","webhook"],"created_at":"2025-08-04T11:02:25.451Z","updated_at":"2025-08-04T11:04:14.468Z","avatar_url":"https://github.com/zc2638.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# review-bot\n\n![Main CI WorkFlow](https://github.com/zc2638/review-bot/workflows/Main%20CI%20WorkFlow/badge.svg)\n\ngitlab review-bot\n\n## Settings\n\n### Step 1: Create Private Token\n\n![](./docs/image/private-token.png)\n\n### Step 2: Deploy Review Bot\n\n```shell\ndocker run -d -p 2640:2640 \\\n    -e BOT_SCM_HOST=https://gitlab.com \\\n    -e BOT_SCM_TOKEN=\u003cyour-private-token\u003e \\\n    -e BOT_SCM_SECRET=\u003cyour-webhook-secret\u003e \\\n    zc2638/review-bot:latest\n```\n\n- `https://gitlab.com` replace with the actual gitlab server address\n- `\u003cyour-private-token\u003e` replace with the token generated by step1\n- `\u003cyour-webhook-secret\u003e` replace with a custom password for the webhook, which can be a random string\n\n### Step 3: Generate Webhook Secret\n\n1. Directly access the interface to request to obtain the secret key\n\n`GET /secret?namespace=zc\u0026name=test`\n\n2. Visit Online API Doc `http://\u003cyour-server-address\u003e/swagger/ui`\n\n![](./docs/image/webhook-secret.png)\n\n### Step 4: Add Project Webhook\n\n![](./docs/image/webhook.png)\n\n- add webhook to associated project, URL is `http://\u003cyour-host-address\u003e/webhook`\n- the `review-bot` user must have your project permissions\n- webhook must set sufficient permissions(e.g. `Comments`、`Confidential Comments`、`Pull request events`)\n\n### Step 5: Add Project Config\n\nPlease add the `.gitlab/review.yml` configuration file to the default branch of the project repository.  \nYou can refer to the [`.gitlab` directory](./.gitlab) settings of this project.\n\n```yaml\n# can use /lgtm\nreviewers:\n  - reviewer1\n  - reviewer2\n\n# can use /approve\napprovers:\n  - approver1\n  - approver2\n\n# merge request settings\npullrequest:\n  # The merge information is mainly based on the title of PR\n  # otherwise it is mainly based on the content of \u003c!-- title --\u003e\u003c!-- end title --\u003e in PR description template\n  squash_with_title: true\n\n# custom label settings\ncustom_labels:\n  # Operation instructions in comments\n  - order: /kind cleanup\n    # Label name associated with the instruction\n    name: kind/cleanup\n    # Automatically add prefix for merged submission information\n    short: cleanup\n    # Label background color\n    color: #33a3dc\n    # Label description\n    description: \"kind: cleanup code\"\n\n  - order: /area scheduler\n    name: area/scheduler\n    color: #96582a\n    description: \"area: scheduler service code area\"\n```\n\n### Step 6 (optional): Add Merge Request Template\n\n- Download at url `GET /download?type=gitlab`\n- Unzip and move the directory `gitlab` to `.gitlab` in your project\n\nYou can refer to the [`.gitlab` directory](./.gitlab) settings of this project.\n\n**Please Enjoy it**\n\n## Deploy\n\n### Local\n\n```\ngo run github.com/zc2638/review-bot/cmd -c config/config.yaml\n```\n\n### Docker\n\n```\ndocker run -d -p 2640:2640 \\\n    -e BOT_SCM_HOST=https://gitlab.com \\\n    -e BOT_SCM_TOKEN=\u003cyour-private-token\u003e \\\n    -e BOT_SCM_SECRET=\u003cyour-webhook-secret\u003e \\\n    zc2638/review-bot:latest\n```\n\n## Config\n\nchange config file in `config/config.yaml`\n\n```\nserver:\n  port: 2640\nscm:\n  host: https://gitlab.com\n  token: \u003cyour-private-token\u003e\n  secret: \u003cyour-webhook-secret\u003e\n```\n\n| Configuration Item | Environment Variable |          Description           |\n|:------------------:|:--------------------:|:------------------------------:|\n|    server.port     |   BOT_SERVER_PORT    |   bot server listening port    |\n|      scm.host      |     BOT_SCM_HOST     | source code management address |\n|     scm.token      |    BOT_SCM_TOKEN     |         private token          |\n|     scm.secret     |    BOT_SCM_SECRET    |         webhook secret         |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzc2638%2Freview-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzc2638%2Freview-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzc2638%2Freview-bot/lists"}