{"id":18026833,"url":"https://github.com/yegor256/mergem","last_synced_at":"2025-03-27T01:31:28.694Z","repository":{"id":62680124,"uuid":"561615984","full_name":"yegor256/mergem","owner":"yegor256","description":"A command line client to GitHub API that tries to deal with incoming Pull Requests","archived":false,"fork":false,"pushed_at":"2024-05-22T10:38:55.000Z","size":411055,"stargazers_count":4,"open_issues_count":7,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-05-22T11:44:57.382Z","etag":null,"topics":["devops","devops-tools","github-bot","github-client","pull-requests"],"latest_commit_sha":null,"homepage":"","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/yegor256.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}},"created_at":"2022-11-04T04:40:16.000Z","updated_at":"2024-05-31T08:48:22.721Z","dependencies_parsed_at":"2023-11-06T08:29:30.335Z","dependency_job_id":"4a92ca51-d35b-4a63-8baa-efd9ba55c597","html_url":"https://github.com/yegor256/mergem","commit_stats":{"total_commits":46,"total_committers":2,"mean_commits":23.0,"dds":"0.021739130434782594","last_synced_commit":"5cd70e4f054d84823c0df7fb07f7e79007742e84"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fmergem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fmergem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fmergem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yegor256%2Fmergem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yegor256","download_url":"https://codeload.github.com/yegor256/mergem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245764717,"owners_count":20668466,"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":["devops","devops-tools","github-bot","github-client","pull-requests"],"created_at":"2024-10-30T08:08:13.869Z","updated_at":"2025-03-27T01:31:28.686Z","avatar_url":"https://github.com/yegor256.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![EO principles respected here](https://www.elegantobjects.org/badge.svg)](https://www.elegantobjects.org)\n[![DevOps By Rultor.com](http://www.rultor.com/b/yegor256/mergem)](http://www.rultor.com/p/yegor256/mergem)\n[![We recommend RubyMine](https://www.elegantobjects.org/rubymine.svg)](https://www.jetbrains.com/ruby/)\n\n[![rake](https://github.com/yegor256/mergem/actions/workflows/rake.yml/badge.svg)](https://github.com/yegor256/mergem/actions/workflows/rake.yml)\n[![Gem Version](https://badge.fury.io/rb/mergem.svg)](http://badge.fury.io/rb/mergem)\n[![License](https://img.shields.io/badge/license-MIT-green.svg)](https://github.com/yegor256/mergem/blob/master/LICENSE.txt)\n[![Test Coverage](https://img.shields.io/codecov/c/github/yegor256/mergem.svg)](https://codecov.io/github/yegor256/mergem?branch=master)\n[![Hits-of-Code](https://hitsofcode.com/github/yegor256/mergem)](https://hitsofcode.com/view/github/yegor256/mergem)\n\nThis simple script may help you deal with pull requests\ncoming to your GitHub repositories from robots:\n\n```bash\n$ gem install mergem\n```\n\nThen, run it locally and read its output:\n\n```bash\n$ mergem --repo yegor256/mergem --verbose --token \u003cYOUR_GITHUB_TOKEN\u003e\n```\n\nFirst, it will find all pull requests in `yegor256/mergem` GitHub repository,\nwhich were not yet discussed by the owner of the token. Then, it will ignore\nthose pull requests that are coming not\nfrom [Renovate](https://github.com/apps/renovate)\nor [Dependabot](https://github.com/dependabot). Then, it will\npost `@rultor merge` text message to each pull request left in the list.\n\n## Token\n\n`mergem` requires a GitHub token to be passed via the `--token` option. To\nobtain one, go to your GitHub account, then navigate to \"Settings,\" and then\nto \"Developer Settings\" (or simply use\nthe [link](https://github.com/settings/tokens).)\n\n### Classic Token\n\nYou can create a classic token with the `public_repo` (\"Access public\nrepositories\") scope. It will grant `mergem` all the necessary permissions to\nread and write comments on repositories.\n\n### Fine-grained Token\n\nAnother option is to create a fine-grained token with \"All Repositories\" access.\nIn this case, you will need to assign the following permissions to the token:\n\n* Issues, \"Read and write\"\n* Pull requests, \"Read and write\"\n* Contents, \"Read and write\"\n\nPlease note that fine-grained tokens might encounter issues with repositories\nnot owned by you or owned by an organization. In such cases, you may need to\nobtain additional approval from the organization.\n\n\u003e During the beta, organizations must opt in to fine-grained personal access\n\u003e tokens. If your organization has not already opted-in, then you will be\n\u003e prompted\n\u003e to opt-in and set policies when you follow the steps below.\n\nYou can find information about setting a personal access token policy for your\norganization\nright [here](https://docs.github.com/en/organizations/managing-programmatic-access-to-your-organization/setting-a-personal-access-token-policy-for-your-organization).\n\n## How to contribute\n\nRead [these guidelines](https://www.yegor256.com/2014/04/15/github-guidelines.html).\nMake sure your build is green before you contribute your pull request. You will\nneed to have [Ruby](https://www.ruby-lang.org/en/) 2.3+\nand [Bundler](https://bundler.io/) installed. Then:\n\n```\n$ bundle update\n$ bundle exec rake\n```\n\nIf it's clean and you don't see any error messages, submit your pull request.\n\nIn order to run a single test:\n\n```\n$ bundle exec ruby test/test_askrultor.rb\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2Fmergem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyegor256%2Fmergem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyegor256%2Fmergem/lists"}