{"id":19755929,"url":"https://github.com/elninotech/mergeminion","last_synced_at":"2025-04-30T11:33:11.606Z","repository":{"id":200997222,"uuid":"706710896","full_name":"elninotech/mergeminion","owner":"elninotech","description":"🤖 An app that creates threaded visual merge request Slack messages through a GitLab webhook","archived":false,"fork":false,"pushed_at":"2024-11-27T00:24:43.000Z","size":1670,"stargazers_count":6,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-06T01:31:59.126Z","etag":null,"topics":["gitlab","notifier","review-tools","slack","slack-bot"],"latest_commit_sha":null,"homepage":"","language":"Python","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/elninotech.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":"2023-10-18T13:25:38.000Z","updated_at":"2024-07-20T12:26:50.000Z","dependencies_parsed_at":null,"dependency_job_id":"27f6fff4-e2b7-4a5b-85d1-4cf90d993587","html_url":"https://github.com/elninotech/mergeminion","commit_stats":null,"previous_names":["elninotech/mergeminion"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elninotech%2Fmergeminion","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elninotech%2Fmergeminion/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elninotech%2Fmergeminion/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elninotech%2Fmergeminion/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elninotech","download_url":"https://codeload.github.com/elninotech/mergeminion/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251691543,"owners_count":21628342,"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":["gitlab","notifier","review-tools","slack","slack-bot"],"created_at":"2024-11-12T03:14:16.798Z","updated_at":"2025-04-30T11:33:10.417Z","avatar_url":"https://github.com/elninotech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003eWelcome to mergeminion👋\u003c/h1\u003e\n\n**mergeminion** is an app that creates threaded visual merge request Slack messages through a GitLab webhook. Once installed, mergeminion:\n- can match **GitLab usernames to Slack usernames** and tag all the users involved in the merge request\n- sends merge request updates in a **thread**, instead of a default new message, thus, improving readability \n- is able to work for **multiple teams**, if each team has a separate Slack channel\n- helps easily identify **merge request status** that updates based on GitLab activity\n- supports **self-hosted GitLab**\n\n### Demo:\n_usernames redacted for privacy_\n\n|                                                                                                 |                                                                                               |\n|:-----------------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------------:|\n|                   \u003cimg width=\"1604\" src=\"img/new_mr.png\"\u003e  New merge request                    |              \u003cimg width=\"1604\"  src=\"img/merged.png\"\u003e  Merge request was merged               |\n|                \u003cimg width=\"1604\" src=\"img/approved.png\"\u003e  Merge request approved                |            \u003cimg width=\"1604\"  src=\"img/unapproved.png\"\u003e  Merge request unapproved             |\n|                 \u003cimg width=\"1604\" src=\"img/reopen.png\"\u003e  Merge request reopened                 |               \u003cimg width=\"1604\" src=\"img/closed.png\"\u003e Merge request was closed                |\n|             \u003cimg width=\"1604\" src=\"img/reviewer.png\"\u003e  A reviewer has been assigned             |     \u003cimg width=\"1604\" src=\"img/assignee.png\"\u003e      Merge request was assigned to somebody     |\n|           \u003cimg width=\"1604\" src=\"img/no.png\"\u003e  All assignees and reviewers unassigned           |   \u003cimg width=\"1604\" src=\"img/reviewer_2.png\"\u003e    New reviewer assigned, old one unassigned    |\n|                  \u003cimg width=\"1604\" src=\"img/target_branch.png\"\u003e   Target branch has changed     | |\n\n\n# 🛠 Getting started\nTo run the app on production, you need to deploy it to a server. We run this app on a cluster, you may choose whatever suits you. The app consists of both Flask and Slack Bolt apps, first handling incoming webhook requests, and the other communicating with Slack via Socket Mode. After deploying, add your app URL to `.env` under `BOT_URL` variable. For local development, you can run:\n```\n$ docker compose up\n```\nNow, you are receiving requests on this ngrok forwarding URL(save it, you will need to set up your webhooks). Unless you have a paid plan, your forwarding URL will change every time you start the container:\n\n\u003cimg src=\"img/ngrok.png\"/\u003e\n\n## \u003cimg src=\"img/gitlab.png\" width=\"20\"/\u003e GitLab\n- Come up with a token that will authenticate request coming from GitLab and add it as `GITLAB_WEBHOOK_TOKEN` variable\n\n**Connecting 1 project to the app:**\n\n- If you only want to connect a specific project to the app, go the that project, then `Settings-\u003eWebhooks-\u003eAdd new webhook`. Insert your app URL (ngrok forwarding URL for local development) as URL (e.g. `https://test.ngrok-free.app/mr/notify?channel=testing_team`) and `GITLAB_WEBHOOK_TOKEN` value as `Secret token`. Enable Merge request Trigger and SSL Verification\n\n**Connecting multiple projects in bulk to the app:** \n\n- If you wish to connect all projects within a GitLab group, add your group name to group ID mappings to `GITLAB_GROUP_ID_MAPPING` environmental variable\n- Set `ACCESS_GITLAB` to `1`\n- Configure `python-gitlab.cfg` with your app user GitLab credentials\n- You can now run `update_webhooks.py` to add the merge request webhook to all the projects within a selected group\n\n## \u003cimg src=\"img/slack.png\" width=\"20\"/\u003e Slack\n- Create a new app in your workspace(https://api.slack.com/apps) from app manifest(`mergeminion-manifest.json`) to correctly configure it\n- Next, add this Slack app's signing secret (available in the app admin panel under **Basic Information** -\u003e **App Credentials**), bot token (available in the app admin panel under **OAuth \u0026 Permissions** -\u003e **OAuth Tokens for Your Workspace** -\u003e **Bot User OAuth Token**), and app token (available in the app admin panel under **Basic Information** -\u003e **App-Level Tokens** -\u003e generate Token and Scopes with all scopes) to your `.env` as `SLACK_SIGNING_SECRET`, `SLACK_BOT_TOKEN`, `SLACK_APP_TOKEN`\n- Add all your **team names** to **Slack channel id** mappings as `TEAM_CHANNEL_MAPPING` environmental variable. Team name correspond to the parameter `channel` in your webhook URL\n- You now need to add the app to the channels it is going to post to. Go to a channel, **Integrations** -\u003e **Apps** -\u003e **Add an App** \n\n# 🤖 App settings\nThere are some settings you can enable to tailor the app to your needs:\n- App matches your Slack to GitLab usernames by searching for your GitLab usernames in Slack `name` or `display_name` fields.  If some or none of your GitLab member's usernames match your Slack usernames, you can add custom mapping as `SLACK_GITLAB_USER_MAPPING` variable.\n- If you wish to not receive Slack messages when a draft merge request is created, set `EXCLUDE_DRAFT` to `0`, else `1`\n- If you wish to create a new merge request Slack thread when a draft merge request was marked as ready, set `NOTIFY_WHEN_MR_READY` to `1`, else `0`\n\n# 👥 Contributors\n**mergeminion** is built by \u003ca href=\"https://www.elnino.tech/\"\u003eEl Niño\u003c/a\u003e, a digital development studio in Enschede and The Hague, the Netherlands, that builds custom web and mobile apps, webshops, and more, backed by 14+ years of experience.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felninotech%2Fmergeminion","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felninotech%2Fmergeminion","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felninotech%2Fmergeminion/lists"}