Bulwark
An implementation of GitHub's CODEOWNERS file, but for GitLab.
Install / Use
/learn @pauldotknopf/BulwarkREADME
Bulwark
An implementation if GitHub's CODEOWNERS file, but for GitLab.
Details
The CODEOWNERS file acts exactly as .gitignore. Similary, the file can also be nested in child directories to add/remove inherited users.
* pauldotknopf
*.txt someoneelse
# You can also remove users from previously inherited matches.
*.pdf !pauldotknopf
Installation
- Run the web hook server. Example
docker-compose.ymlfile here. Configurable options here.- At a bare minimum, you should have the following configured for Bulwark to properly communicate with GitLab.
This configuration should go in a{ "GitLab": { "AuthenticationToken": "your-auth-token" } }config.jsonfile in the working directory of the running Bulwark instance. - On GitLab under
Project > Settings > Integrations, add a web hook that points tohttps://your-bulwark-instance.com/gitlaband tick the following:- [x] Push events
- [x] Merge request events
- On GitLab under
Project > Settings > General, tick following:- [x] Merge request approvals
- [x] Can override approvers and approvals required per merge request
- [x] Remove all approvals in a merge request when new commits are pushed to its source branch (optional)
That's it. Submit a pull request with a CODEOWNERS file and watch users get automatically assigned as reviewers.
More options
Message queue
Defaults:
{
"MessageQueue": {
"Type": "Sqlite",
"SqlLiteDBLocation": "sqlite.db",
"RabbitMqHost": null,
"RabbitMqUsername": null,
"RabbitMqPassword": null,
"RabbitMqPort": 5672
}
}
Details:
"Type":"Sqlite"- The default method. New messages are stored in the database and a worker thread (or another process) consumes them."RabbitMq"- Use an external RabbitMQ server to store the message.
GitLab
Defaults:
{
"GitLab": {
"Enabled": true,
"ServerUrl": "https://gitlab.com/",
"AuthenticationToken": null,
"SecretToken": null,
"TargetBranchesFilter": null,
"AutoMergePullRequests": false,
"MergeCommitMessage": null,
"MergeWhenPipelineSuceeds": null,
"ShouldRemoveSourceBranch": null,
"UseHttp": true,
"HttpUsername: null,
"HttpPassword": null
}
}
Details:
"ServerUrl": You can point this togitlab.comor your own hosted GitLab instance."AuthenticationToken": Generate this from your account settings."SecretToken": The secret token, configured in GitLab, for the web hook. This ensures that only GitLab can post to your hook."TargetBranchesFilter": A regular expression to match against branches you wish to process. You may want to set this to"master"."AutoMergePullRequests": If all the required approvers have approved, you can configure Bulwark to auto merge the merge request. You might want to update yourProject > Settings > Repository > Protected Branchessettings to only authorize Bulwark to merge your merge requests to your desired branch."MergeCommitMessage": Self explanatory, empty if you want GitLab to auto-generate a merge commit message. You can alse use tokens{MergeRequestTitle}and{MergeRequestReference}for a message like{MergeRequestTitle}\nSee {MergeRequestReference} for more detais.."MergeWhenPipelineSuceeds": When performing the merge, only do so when pipelines succeed."ShouldRemoveSourceBranch": Self explanatory, empty if you want to let GitLab to use the configured value for the merge request."UseHttp": Use http to clone git repositories. Otherwise, ssh."HttpUsername": The username to use when cloning via http."HttpPassword": The password to use when cloding via http.
Repository cache
Defaults:
{
"RepositoryCache": {
"RepositoryCacheLocation": "repository-cache"
}
}
Details:
"RepositoryCacheLocation": The directory that repositories will be cloned to do internal diffs between commits.
Related Skills
node-connect
346.8kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.8kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.8kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。
