@@ -142,7 +142,9 @@ optional arguments:
142142 [env var: MARGE_USE_MERGE_COMMIT_BATCHES] (default: False)
143143 --skip-ci-batches Skip CI when updating individual MRs when using batches [env var: MARGE_SKIP_CI_BATCHES] (default: False)
144144` ` `
145+
145146Here is a config file example
147+
146148` ` ` yaml
147149add-part-of: true
148150add-reviewers: true
@@ -164,8 +166,8 @@ ssh-key-file: token.FILE
164166# OR use HTTPS instead of SSH
165167# use-https: true
166168` ` `
167- For more information about configuring marge-bot see ` --help`
168169
170+ For more information about configuring marge-bot see ` --help`
169171
170172# # Running
171173
@@ -280,6 +282,7 @@ docker run --restart=on-failure \ # restart if marge crashes because GitLab is f
280282HTTPS can be used using any other deployment technique as well.
281283
282284### Running marge-bot in kubernetes
285+
283286It' s also possible to run marge in kubernetes, e.g. here' s how you use a ktmpl
284287template:
285288
@@ -298,6 +301,7 @@ Once running, the bot will continuously monitor all projects that have its user
298301will pick up any changes in membership at runtime.
299302
300303### Running marge-bot in Swarm
304+
301305Or you can run marge in Docker Swarm, e.g. here' s how you use a compose file:
302306
303307` ` ` yaml
@@ -364,46 +368,39 @@ run:
364368
365369# ## Running marge-bot as a plain python app
366370
367- # ### Installing marge-bot with nix
368-
369- Alternatively, if you prefer not to use docker, you can also directly run marge.
370- If you use [nix](https://nixos.org/nix/) do ` nix-env --install -f default.nix` .
371-
372- The nix install should be fully reproducible on any version of linux (and also
373- work on OS X, although this is not something we properly test). If you don' t
374- want to use docker we recommend you give nix a try.
375-
376- #### Installing marge-bot the old-fashioned way
377-
378- Finally, although this is our least preferred alternative, you can always do
379- `python3 setup.py install` (note that you will need python3.6).
371+ Install all dependencies with ` poetry install` (note that you will need Python 3.6+).
380372
381373Afterwards, the minimal way to run marge is as follows.
382374
383375` ` ` bash
384- marge.app --auth-token-file marge-bot.token \
385- --gitlab-url ' http://your.gitlab.instance.com' \
386- --ssh-key-file marge-bot-ssh-key
376+ poetry run marge --auth-token-file marge-bot.token \
377+ --gitlab-url ' http://your.gitlab.instance.com' \
378+ --ssh-key-file marge-bot-ssh-key
387379` ` `
388380
389381However, we suggest you use a systemd unit file or some other mechanism to
390382automatically restart marge-bot in case of intermittent GitLab problems.
391383
392- ### Setting up a development environment
384+ # # Setting up a development environment
393385
394- Install `nix` by following https://nix.dev/tutorials/install-nix:
386+ 1. Install ` poetry` with ` pip install poetry` .
387+ 2. Check out this repository.
388+ 3. Run ` poetry install` in the repository root.
389+
390+ ### Running linting and tests
395391
396392` ` ` shell
397- $ sh <(curl -L https://nixos.org/nix/install) --daemon
393+ poetry run pytest
398394` ` `
399395
400- After that, a Docker image can be built with:
396+ ### Run marge-bot
401397
402398` ` ` shell
403- $ make dockerize
399+ poetry run marge
404400` ` `
405401
406402## Suggested workflow
403+
4074041. Alice creates a new merge request and assigns Bob and Charlie as reviewers
408405
4094062. Both review the code and after all issues they raise are resolved by Alice,
@@ -416,7 +413,6 @@ $ make dockerize
416413 the merge request via the GitLab API. It can also add some headers to all
417414 commits in the merge request as described in the next section.
418415
419-
420416# # Adding Reviewed-by:, Tested: and Part-of: to commit messages
421417
422418Marge-bot supports automated addition of the following
@@ -456,6 +452,7 @@ commits introduced by a single Merge Request when using a fast-forward/rebase
456452based merge workflow.
457453
458454# # Impersonating approvers
455+
459456If you want a full audit trail, you will configure GitLab
460457[require approvals](https://docs.gitlab.com/ee/user/project/merge_requests/merge_request_approvals.html#approvals-required)
461458for PRs and also turn on
@@ -478,7 +475,6 @@ More than one embargo period can be specified, separated by commas. Any merge
478475request assigned to her during an embargo period, will be merged in only once all
479476embargoes are over.
480477
481-
482478## Batching Merge Requests
483479
484480The flag `--batch` enables testing and merging merge requests in batches. This can
@@ -600,7 +596,6 @@ This reverts commit 0af5b70a98858c9509c895da2a673ebdb31e20b1.
600596
601597E.g. `git revert-mr 123`.
602598
603-
604599## Troubleshooting
605600
606601Marge-bot continuously logs what she is doing, so this is a good place to look
0 commit comments