{"id":17979477,"url":"https://github.com/pauldotknopf/bulwark","last_synced_at":"2025-03-25T17:32:31.677Z","repository":{"id":147675076,"uuid":"133201388","full_name":"pauldotknopf/bulwark","owner":"pauldotknopf","description":"An implementation of GitHub's CODEOWNERS file, but for GitLab.","archived":false,"fork":false,"pushed_at":"2025-02-12T03:36:33.000Z","size":146,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-20T14:48:25.310Z","etag":null,"topics":["codeowner-managed","dotnet","gitlab","merge-request","pull-requests"],"latest_commit_sha":null,"homepage":"","language":"C#","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/pauldotknopf.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-13T03:07:36.000Z","updated_at":"2025-02-12T03:28:02.000Z","dependencies_parsed_at":null,"dependency_job_id":"65dc14ea-8e57-47d0-9820-cce04ca372fc","html_url":"https://github.com/pauldotknopf/bulwark","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldotknopf%2Fbulwark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldotknopf%2Fbulwark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldotknopf%2Fbulwark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pauldotknopf%2Fbulwark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pauldotknopf","download_url":"https://codeload.github.com/pauldotknopf/bulwark/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245510885,"owners_count":20627283,"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":["codeowner-managed","dotnet","gitlab","merge-request","pull-requests"],"created_at":"2024-10-29T17:37:45.384Z","updated_at":"2025-03-25T17:32:31.671Z","avatar_url":"https://github.com/pauldotknopf.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bulwark\n\nAn implementation if GitHub's CODEOWNERS file, but for GitLab.\n\n[![Bulwark](https://img.shields.io/nuget/v/Bulwark.svg?style=flat-square\u0026label=Bulwark)](http://www.nuget.org/packages/Bulwark/)\n[![Build Status](https://travis-ci.com/pauldotknopf/bulwark.svg?branch=develop)](https://travis-ci.com/pauldotknopf/bulwark)\n\n## Details\n\nThe `CODEOWNERS` file acts exactly as `.gitignore`. Similary, the file can also be nested in child directories to add/remove inherited users.\n\n```config\n* pauldotknopf\n*.txt someoneelse\n\n# You can also remove users from previously inherited matches.\n*.pdf !pauldotknopf\n\n```\n\n## Installation\n\n1. Run the web hook server. Example `docker-compose.yml` file [here](build/docker/example/docker-compose.yml). Configurable options [here](todo).\n   * At a bare minimum, you should have the following configured for Bulwark to properly communicate with GitLab.\n   ```\n   {\n     \"GitLab\": {\n       \"AuthenticationToken\": \"your-auth-token\"\n      }\n   }\n   ```\n   This configuration should go in a `config.json` file in the working directory of the running Bulwark instance.\n2. On GitLab under `Project \u003e Settings \u003e Integrations`, add a web hook that points to `https://your-bulwark-instance.com/gitlab` and tick the following:\n   * [x] Push events\n   * [x] Merge request events\n3. On GitLab under `Project \u003e Settings \u003e General`, tick following:\n   * [x] Merge request approvals\n   * [x] Can override approvers and approvals required per merge request\n   * [x] Remove all approvals in a merge request when new commits are pushed to its source branch (optional)\n\nThat's it. Submit a pull request with a CODEOWNERS file and watch users get automatically assigned as reviewers.\n\n## More options\n\n### Message queue\n\n**Defaults**:\n\n```\n{\n  \"MessageQueue\": {\n    \"Type\": \"Sqlite\",\n    \"SqlLiteDBLocation\": \"sqlite.db\",\n    \"RabbitMqHost\": null,\n    \"RabbitMqUsername\": null,\n    \"RabbitMqPassword\": null,\n    \"RabbitMqPort\": 5672\n  }\n}\n```\n\n**Details**:\n\n* `\"Type\"`:\n  * `\"Sqlite\"` - The default method. New messages are stored in the database and a worker thread (or another process) consumes them.\n  * `\"RabbitMq\"` - Use an external RabbitMQ server to store the message.\n\n### GitLab\n\n**Defaults**:\n\n```\n{\n  \"GitLab\": {\n    \"Enabled\": true,\n    \"ServerUrl\": \"https://gitlab.com/\",\n    \"AuthenticationToken\": null,\n    \"SecretToken\": null,\n    \"TargetBranchesFilter\": null,\n    \"AutoMergePullRequests\": false,\n    \"MergeCommitMessage\": null,\n    \"MergeWhenPipelineSuceeds\": null,\n    \"ShouldRemoveSourceBranch\": null,\n    \"UseHttp\": true,\n    \"HttpUsername: null,\n    \"HttpPassword\": null\n  }\n}\n```\n\n**Details**:\n\n* `\"ServerUrl\"`: You can point this to ```gitlab.com``` or your own hosted GitLab instance.\n* `\"AuthenticationToken\"`: Generate this from your account settings.\n* `\"SecretToken\"`: The secret token, configured in GitLab, for the web hook. This ensures that only GitLab can post to your hook.\n* `\"TargetBranchesFilter\"`: A regular expression to match against branches you wish to process. You may want to set this to `\"master\"`.\n* `\"AutoMergePullRequests\"`: If all the required approvers have approved, you can configure Bulwark to auto merge the merge request. You might want to update your `Project \u003e Settings \u003e Repository \u003e Protected Branches` settings to only authorize Bulwark to merge your merge requests to your desired branch.\n* `\"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.`.\n* `\"MergeWhenPipelineSuceeds\"`: When performing the merge, only do so when pipelines succeed.\n* `\"ShouldRemoveSourceBranch\"`: Self explanatory, empty if you want to let GitLab to use the configured value for the merge request.\n* `\"UseHttp\"`: Use http to clone git repositories. Otherwise, ssh.\n* `\"HttpUsername\"`: The username to use when cloning via http.\n* `\"HttpPassword\"`: The password to use when cloding via http.\n\n### Repository cache\n\n**Defaults**:\n\n```\n{\n  \"RepositoryCache\": {\n    \"RepositoryCacheLocation\": \"repository-cache\"\n  }\n}\n```\n\n**Details**:\n\n* `\"RepositoryCacheLocation\"`: The directory that repositories will be cloned to do internal diffs between commits.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauldotknopf%2Fbulwark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpauldotknopf%2Fbulwark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpauldotknopf%2Fbulwark/lists"}