{"id":17983551,"url":"https://github.com/vvscode/gitlab-mr-require-checkboxes","last_synced_at":"2026-01-04T06:39:48.870Z","repository":{"id":252045900,"uuid":"839231772","full_name":"vvscode/gitlab-mr-require-checkboxes","owner":"vvscode","description":"[CLI] Require checkboxes in GitLab MR description to be checked","archived":false,"fork":false,"pushed_at":"2024-08-22T07:34:19.000Z","size":241,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T17:41:56.106Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/vvscode.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":"2024-08-07T07:50:57.000Z","updated_at":"2024-08-22T07:34:22.000Z","dependencies_parsed_at":"2024-08-07T12:06:00.880Z","dependency_job_id":"711da52e-9661-4ea3-826d-f48c8ab0d432","html_url":"https://github.com/vvscode/gitlab-mr-require-checkboxes","commit_stats":null,"previous_names":["vvscode/gitlab-mr-require-checkboxes"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvscode%2Fgitlab-mr-require-checkboxes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvscode%2Fgitlab-mr-require-checkboxes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvscode%2Fgitlab-mr-require-checkboxes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vvscode%2Fgitlab-mr-require-checkboxes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vvscode","download_url":"https://codeload.github.com/vvscode/gitlab-mr-require-checkboxes/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245526460,"owners_count":20629835,"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":[],"created_at":"2024-10-29T18:17:39.407Z","updated_at":"2026-01-04T06:39:48.826Z","avatar_url":"https://github.com/vvscode.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitlab-mr-require-checkboxes\n\n[![npm version](https://badge.fury.io/js/gitlab-mr-require-checkboxes.svg)](https://www.npmjs.com/package/gitlab-mr-require-checkboxes)\n[![Deploy](https://github.com/vvscode/gitlab-mr-require-checkboxes/workflows/Release/badge.svg)](https://github.com/vvscode/gitlab-mr-require-checkboxes/actions)\n\n## [CLI] Require checkboxes in GitLab MR description to be checked\n\nA simple CLI tool to check that all checkboxes in a merge request description are checked is designed as follows:\n\n- Fetch Merge Request Data: The tool connects to the Git repository hosting service (e.g., GitHub, GitLab) and retrieves the merge request description.\n- Parse Checkboxes: It parses the description to identify all checkboxes.\n- Check Checkbox Status: It verifies that all checkboxes are marked as checked.\n- Exit with status code 1 if there are non ticked checkboxes.\n\nRelated links:\n\n- [How Can We Check All Checkbox Are Checked in Gitlab Merge Request Template](https://stackoverflow.com/questions/73302452/how-can-we-check-all-checkbox-are-checked-in-gitlab-merge-request-template)\n- [Can I require a \"sign-off\" checkbox to be checked before a merge can be done?](https://stackoverflow.com/questions/68802300/can-i-require-a-sign-off-checkbox-to-be-checked-before-a-merge-can-be-done)\n\nThe cli uses environment variables to pass settings:\n\n- `GITLAB_API_TOKEN` - this one you need to create, it's used to access gitlab API\n- `CI_PROJECT_ID`, `CI_MERGE_REQUEST_IID`, `CI_SERVER_URL` are passed to pipeline by Gitlab\n\n## How to use in ci config:\n\n```yml\n# Define GITLAB_API_TOKEN on the job/project level\ncheck-mr-description:\n  image: 'some-image-with-npx'\n  stage: install\n  env\n  only:\n    - merge_requests\n  script:\n    - npx -y gitlab-mr-require-checkboxes@latest check\n```\n\n### Extra configuration\n\nYou can mark part of checkboxes as required (by default it's applicable to the whole description) with wrapping them into wrappers:\n\n```md\n\u003c!-- required-checkboxes-start --\u003e\n\n- [x] required 1\n- [ ] required 2\n\u003c!-- required-checkboxes-end --\u003e\n- [x] optional 1\n- [ ] optional 2\n```\n\nWrapper can be used multiple times.\n\n### Note\n\nIt will add MR note with a fail message as well. If you want to customize message - set `NOTE_ERROR_MESSAGE` environment variable. It you don't need it - put it to `\"\"` (empty string)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvscode%2Fgitlab-mr-require-checkboxes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvvscode%2Fgitlab-mr-require-checkboxes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvvscode%2Fgitlab-mr-require-checkboxes/lists"}