{"id":13684299,"url":"https://github.com/manicmaniac/danger-mailmap","last_synced_at":"2026-02-13T08:08:40.662Z","repository":{"id":64902527,"uuid":"533896549","full_name":"manicmaniac/danger-mailmap","owner":"manicmaniac","description":"A Danger plugin to check if .mailmap has a canonical name of author and committer.","archived":false,"fork":false,"pushed_at":"2025-12-28T08:00:54.000Z","size":270,"stargazers_count":0,"open_issues_count":5,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-30T15:55:44.863Z","etag":null,"topics":["danger-plugin","git","mailmap","ruby"],"latest_commit_sha":null,"homepage":"https://www.rubydoc.info/gems/danger-mailmap/0.1.0","language":"Ruby","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/manicmaniac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-09-07T18:44:51.000Z","updated_at":"2025-12-28T08:00:57.000Z","dependencies_parsed_at":"2023-10-01T15:24:39.189Z","dependency_job_id":"1dd92975-11af-4c6a-b934-c8562773eb39","html_url":"https://github.com/manicmaniac/danger-mailmap","commit_stats":{"total_commits":80,"total_committers":2,"mean_commits":40.0,"dds":"0.17500000000000004","last_synced_commit":"ce74ae1ecd8ddfe8e0df9376690e5f3ec196ac04"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/manicmaniac/danger-mailmap","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manicmaniac%2Fdanger-mailmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manicmaniac%2Fdanger-mailmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manicmaniac%2Fdanger-mailmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manicmaniac%2Fdanger-mailmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manicmaniac","download_url":"https://codeload.github.com/manicmaniac/danger-mailmap/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manicmaniac%2Fdanger-mailmap/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29399431,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-13T06:24:03.484Z","status":"ssl_error","status_checked_at":"2026-02-13T06:23:12.830Z","response_time":78,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["danger-plugin","git","mailmap","ruby"],"created_at":"2024-08-02T14:00:32.019Z","updated_at":"2026-02-13T08:08:40.658Z","avatar_url":"https://github.com/manicmaniac.png","language":"Ruby","funding_links":[],"categories":["Plugins"],"sub_categories":["Ruby (danger)"],"readme":"# danger-mailmap\n\n[![Test](https://github.com/manicmaniac/danger-mailmap/actions/workflows/test.yml/badge.svg)](https://github.com/manicmaniac/danger-mailmap/actions/workflows/test.yml)\n[![Maintainability](https://qlty.sh/gh/manicmaniac/projects/danger-mailmap/maintainability.svg)](https://qlty.sh/gh/manicmaniac/projects/danger-mailmap)\n[![Test Coverage](https://qlty.sh/gh/manicmaniac/projects/danger-mailmap/coverage.svg)](https://qlty.sh/gh/manicmaniac/projects/danger-mailmap)\n[![Gem Version](https://badge.fury.io/rb/danger-mailmap.svg)](https://rubygems.org/gems/danger-mailmap)\n\nA Danger plugin to check if .mailmap has a canonical name of author and committer.\n\n\u003cimg width=\"897\" alt=\"image\" src=\"https://user-images.githubusercontent.com/1672393/208232044-ddc8ce05-9bcb-42d4-9d5e-4d61c2b677a3.png\"\u003e\n\n## Installation\n\n```sh\ngem install danger-mailmap\n```\n\nOr write the following code in your Gemfile.\n\n```ruby\ngem 'danger-mailmap'\n```\n\n## Usage\n\nThe easiest way to use is just add this to your Dangerfile:\n\n```ruby\nmailmap.check\n```\n\nIf your repository has a mailmap file located in the place other than `.mailmap`, you can pass the path as argument.\n\n```ruby\nmailmap.check '/path/to/mailmap'\n```\n\nIf you want `danger-mailmap` to ignore a particular user regardless of mailmap, set `allowed_patterns`.\n\n```ruby\nmailmap.allowed_patterns = [\n  /.+@(users\\.noreply\\.)?github\\.com/,\n  'good@example.com'\n]\nmailimap.check\n```\n\n## What is mailmap?\n\n`mailmap` is a file that maps Git author and committer names and/or email addresses.\n\nSee `man 5 gitmailmap` or https://git-scm.com/docs/gitmailmap for the detail.\n\n## How to fix warnings\n\u003ca name=\"how-to-fix\"\u003e\u003c/a\u003e\u003c!-- Do not change this line. This anchor is referenced in lib/danger_plugin.rb --\u003e\n\nIf you encountered warnings like *email@example.com is not included in .mailmap*, basically you have 4 options.\n\n1. Rewrite author and/or committer of each commit in the pull request.\n2. Add new entry to mailmap.\n3. Add new allow-list entry to Dangerfile.\n4. Do nothing and remain everything as-is.\n\nIf you don't want to continue using `email@example.com`, `1.` is the most preferable option.\nSee [How to rewrite author and/or committers](#how-to-rewrite-author-andor-committers) section.\n\nIf it is the first time for you to contribute to the repository, you may want to choose the option `2.`.\nJust add `Your Name \u003cemail@example.com\u003e` to the mailmap file and commit it.\n\nIf `email@example.com` is an email address of a bot user and it can vary, you can add it to allow-list.\nFor example, [renovate](https://github.com/renovatebot/renovate) bot has variable email like `29139614+renovate[bot]@users.noreply.github.com`.\nSee [Usage](#usage) section to know how to use `mailmap.allowed_patterns`.\n\nLastly, when you clearly know what you are doing or you have your teammates' permission, the option `4.` is obviously the most easiest way.\n\n## How to avoid making commits with unintended author/committer email\n\nYou need to tell Git to use the correct name and email like the following:\n\n```sh\ngit config --global user.email 'correct@example.com'\ngit config --global user.name 'Correct Name'\n```\n\nIf you have multiple names or emails and changes them by repository, you may want to set name and email to the specific repository.\n\nUse `--global` option instead of `--local` in this case.\n\n```sh\ngit config --local user.email 'correct@example.com'\ngit config --local user.name 'Correct Name'\n```\n\n## How to rewrite author and/or committers\n\nYou can rewrite existing commits' author and/or committer in a pull request with `git filter-branch` command.\n\nLet's say that you made a pull request with `wip` branch based on `master` branch and `danger-mailmap` complains *`old@example.com` is not included in mailmap*. You want to change `old@example.com` to `new@example.com` with the proper name `New One`.\n\nIn this case, the following script works well.\n\n```sh\ngit filter-branch --env-filter '\n    if [ \"$GIT_AUTHOR_EMAIL\" = \"old@example.com\" ]; then\n        GIT_AUTHOR_EMAIL=\"new@example.com\"\n        GIT_AUTHOR_NAME=\"New One\"\n    fi\n    if [ \"$GIT_COMMITTER_EMAIL\" = \"old@example.com\" ]; then\n        GIT_COMMITTER_EMAIL=\"new@example.com\"\n        GIT_COMMITTER_NAME=\"New One\"\n    fi\n' --tag-name-filter cat master...wip\n```\n\nPerhaps you may want to undo the changes.\n\nDon't worry, `git filter-branch` automatically backups the original history.\nThe following command rollbacks the previous changes.\n\n```sh\ngit reset --hard original/refs/heads/wip\n```\n\nBy default, `git filter-branch` does not run when a backup for the current branch exists.\n\nYou can delete it by running:\n\n```sh\ngit update-ref -d refs/original/refs/heads/wip\n```\n\nOr just pass `--force` option to the next `git filter-branch` command to overwrite existing backups.\n\nSee [the official document](https://git-scm.com/docs/git-filter-branch) for other examples of `git filter-branch`.\n\n## Development\n\n1. Clone this repo\n2. Run `bundle install` to setup dependencies.\n3. Run `bundle exec rake spec` to run the tests.\n4. Use `bundle exec guard` to automatically have tests run as you make changes.\n5. Make your changes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanicmaniac%2Fdanger-mailmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanicmaniac%2Fdanger-mailmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanicmaniac%2Fdanger-mailmap/lists"}