{"id":28656050,"url":"https://github.com/dhth/mrj","last_synced_at":"2026-03-27T05:15:01.927Z","repository":{"id":294975839,"uuid":"988670080","full_name":"dhth/mrj","owner":"dhth","description":"merge your dependency upgrade PRs","archived":false,"fork":false,"pushed_at":"2025-06-12T16:40:47.000Z","size":230,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-12T17:29:39.900Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://tools.dhruvs.space/mrj","language":"Rust","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/dhth.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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,"zenodo":null}},"created_at":"2025-05-22T22:38:19.000Z","updated_at":"2025-06-12T16:36:51.000Z","dependencies_parsed_at":"2025-05-23T00:39:03.372Z","dependency_job_id":"a8de09e6-e2cf-4ee1-a2c7-4cd71f4d786d","html_url":"https://github.com/dhth/mrj","commit_stats":null,"previous_names":["dhth/mrj"],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/dhth/mrj","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhth%2Fmrj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhth%2Fmrj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhth%2Fmrj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhth%2Fmrj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dhth","download_url":"https://codeload.github.com/dhth/mrj/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dhth%2Fmrj/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259514892,"owners_count":22869942,"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":[],"created_at":"2025-06-13T08:10:11.890Z","updated_at":"2026-03-27T05:15:01.888Z","avatar_url":"https://github.com/dhth.png","language":"Rust","funding_links":[],"categories":["others"],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n  \u003ch1 align=\"center\"\u003emrj\u003c/h1\u003e\n  \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/dhth/mrj/actions/workflows/main.yml\"\u003e\u003cimg alt=\"GitHub release\" src=\"https://img.shields.io/github/actions/workflow/status/dhth/mrj/main.yml?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://crates.io/crates/mrj\"\u003e\u003cimg alt=\"GitHub release\" src=\"https://img.shields.io/crates/v/mrj?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/dhth/mrj/releases/latest\"\u003e\u003cimg alt=\"Latest release\" src=\"https://img.shields.io/github/release/dhth/mrj.svg?style=flat-square\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/dhth/mrj/releases\"\u003e\u003cimg alt=\"Commits since latest release\" src=\"https://img.shields.io/github/commits-since/dhth/mrj/latest?style=flat-square\"\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\u003c/p\u003e\n\n`mrj` merges your open dependency upgrade PRs.\n\n\u003e Want to see a demo before you read the rest of the documentation?\n\u003e View `mrj` in action [here][1].\n\n![usage](https://tools.dhruvs.space/images/mrj/mrj-1.png)\n\n🤔 Motivation\n---\n\nKeeping up with dependency upgrade PRs can be overwhelming — they seem to appear\nnonstop! I wanted a hassle-free tool that would automatically merge open PRs\nbased on a simple set of rules, one that I could also run locally. Having a\nbrowsable archive of past runs was also a priority. After I couldn't find\nanything that fit my needs, I wrote `mrj`.\n\n`mrj` now takes care of merging dependency PRs for my projects. It runs on a\nschedule on GitHub Actions [here][2].\n\n💾 Installation\n---\n\n**homebrew**:\n\n```sh\nbrew install dhth/tap/mrj\n```\n\n**cargo**:\n\n```sh\ncargo install mrj\n```\n\nOr get the binaries directly from a Github [release][3]. Read more about\nverifying the authenticity of released artifacts\n[here](#-verifying-release-artifacts).\n\n⚡️ Usage\n---\n\n```text\n$ mrj -h\nmrj merges your open PRs\n\nUsage: mrj [OPTIONS] \u003cCOMMAND\u003e\n\nCommands:\n  run     Check for open PRs and merge them\n  config  Interact with mrj's config\n  report  Generate report from mrj runs\n  help    Print this message or the help of the given subcommand(s)\n\nOptions:\n      --debug  Output debug information without doing anything\n  -h, --help   Print help\n```\n\n```text\n$ mrj run -h\nCheck for open PRs and merge them\n\nUsage: mrj run [OPTIONS]\n\nOptions:\n  -c, --config \u003cPATH\u003e\n          Path to mrj's config file [default: mrj.toml]\n  -r, --repos \u003cSTRING,STRING\u003e\n          Repos to run for (will override repos in config)\n  -o, --output\n          Whether to write output to a file\n      --debug\n          Output debug information without doing anything\n      --output-path \u003cFILE\u003e\n          Whether to write mrj's log of events to a file [default: output.txt]\n  -s, --summary\n          Whether to write merge summary to a file\n      --summary-path \u003cFILE\u003e\n          File to write summary to [default: summary.txt]\n  -n, --show-repos-with-no-prs\n          Whether to show information for repos with no PRs\n  -u, --show-prs-from-untrusted-authors\n          Whether to show information for PRs from untrusted authors\n  -d, --dry-run\n          Whether to only print out information without merging any PRs\n  -h, --help\n          Print help\n```\n\n```text\n$ mrj report generate -h\nGenerate a report\n\nUsage: mrj report generate [OPTIONS]\n\nOptions:\n  -p, --output-path \u003cPATH\u003e  File containing the output of \"mrj run\" [default: output.txt]\n  -o, --open                Whether to open report in the browser\n  -n, --num-runs \u003cNUMBER\u003e   Maximum number of runs to keep in the report (allowed range: [1, 100]) [default: 10]\n      --debug               Output debug information without doing anything\n  -h, --help                Print help\n```\n\n🔑 Authentication\n---\n\n`mrj` tries to get an authentication token for GitHub in the following order:\n\n- Using the value of environment variable `MRJ_TOKEN`\n- Get it from [gh](https://github.com/cli/cli) (if installed)\n\nMake sure `mrj` can get a token from either one of these approaches, and that\nthe token has the following permissions for the relevant repos:\n\n- Read access to checks, metadata, and pull requests\n- Read and write access to code\n\n🎛️ Config\n---\n\n`mrj` needs a config file to run. Here's a sample config.\n\n```toml\n# repos to run for\n# (required)\nrepos = [\n    \"owner/repo-1\",\n    \"owner/repo-2\",\n    \"owner/repo-3\",\n]\n\n# mrj will only consider repos created by the authors in this list\n# (required)\ntrusted_authors = [\"dependabot[bot]\"]\n\n# by default mrj doesn't filter PRs by base branches\n# (optional, default: empty)\nbase_branch = \"main\"\n\n# by default mrj doesn't filter PRs by head refs\n# read more on this here\n# https://docs.github.com/en/rest/pulls/pulls?apiVersion=2022-11-28#list-pull-requests--parameters\n# the value needs to be valid regex\n# (optional, default: empty)\nhead_pattern = \"(dependabot|update)\"\n\n# by default mrj only considers PRs which can be cleanly merged\n# if this setting is ON, mrj will also consider PRs where merging is blocked\n# (optional, default: false)\nmerge_if_blocked = true\n\n# by default mrj only considers PRs where checks have either passed or are skipped\n# if this setting is OFF, mrj will not merge PRs where one or more checks have been skipped\n# (optional, default: true)\nmerge_if_checks_skipped = true\n\n# squash/merge/rebase (make sure the choice is actually enabled in your settings)\n# (required)\nmerge_type = \"squash\"\n```\n\n📃 Generating a Report\n---\n\n`mrj` lets you create an HTML report from its output. This report holds\ninformation for the latest run as well as the last few runs of `mrj` (for\nhistorical reference). You need an output to be able to generate a report, which\nyou can create by passing the `--output/-o` flag to `mrj run`.\n\n```bash\nmrj run --output\nmrj report generate --open\n```\n\nThis will generate a report that looks like this:\n\n![report](https://tools.dhruvs.space/images/mrj/report-1.png)\n\n⏱️ Running on a schedule via Github Actions\n---\n\nYou can let `mrj` run on a schedule by itself, and have it merge open\nPRs that satisy your requirements.\n\nCreate a GitHub app for yourself that has the following permissions:\n\n- Read access to checks, metadata, and pull requests\n- Read and write access to code\n\nInstall the app in the relevant repositories. Generate a private key for\nyourself.\n\nCreate a dedicated repository to use as the \"runner\" for `mrj` or choose an\nexisting one. Store the App ID and the private key as secrets in this\nrepository.\n\n\u003e [!TIP]\n\u003e You can see the following workflows in action [here][2].\n\nCreate a GitHub workflow as follows:\n\n```yaml\nname: mrj\n\non:\n  schedule:\n    - cron: '0-59/30 21-23 * * *'\n  workflow_dispatch:\n\npermissions:\n  contents: read\n  id-token: write\n\nenv:\n  MRJ_VERSION: v0.1.0\n\njobs:\n  run:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Install mrj\n        uses: jaxxstorm/action-install-gh-release@v2.1.0\n        with:\n          repo: dhth/mrj\n          tag: ${{ env.MRJ_VERSION }}\n      - uses: actions/checkout@v4\n      - name: Generate GH token\n        id: generate-token\n        uses: actions/create-github-app-token@v1\n        with:\n          app-id: ${{ secrets.MRJ_APP_ID }}\n          private-key: ${{ secrets.MRJ_APP_PRIVATE_KEY }}\n          owner: \u003cyour-username\u003e\n      - name: Run mrj\n        env:\n          MRJ_TOKEN: ${{ steps.generate-token.outputs.token }}\n          CLICOLOR_FORCE: 1\n          COLORTERM: \"truecolor\"\n        run: |\n          mrj run\n```\n\nIf you also want to generate reports that can be deployed on GitHub Pages, use\nthe following workflow. Make sure deployment to Github Pages via GitHub Actions\nis enabled for your repository.\n\n```yaml\nname: mrj\n\non:\n  schedule:\n    - cron: '0 21,22 * * *'\n  workflow_dispatch:\n\npermissions:\n  contents: write\n  pages: write\n  id-token: write\n\nenv:\n  MRJ_VERSION: v0.1.0\n\njobs:\n  run:\n    runs-on: ubuntu-latest\n    steps:\n      - name: Install mrj\n        uses: jaxxstorm/action-install-gh-release@v2.1.0\n        with:\n          repo: dhth/mrj\n          tag: ${{ env.MRJ_VERSION }}\n      - uses: actions/checkout@v4\n      - name: Generate GH token\n        id: generate-token\n        uses: actions/create-github-app-token@v1\n        with:\n          app-id: ${{ secrets.MRJ_APP_ID }}\n          private-key: ${{ secrets.MRJ_APP_PRIVATE_KEY }}\n          owner: dhth\n      - name: Run mrj\n        env:\n          MRJ_TOKEN: ${{ steps.generate-token.outputs.token }}\n          CLICOLOR_FORCE: 1\n          COLORTERM: \"truecolor\"\n        run: |\n          mrj run -os\n      - name: Generate report\n        run: |\n          mrj report generate\n      - name: Get run number\n        id: run-number\n        run: echo \"number=$(cat ./.mrj/last-run.txt)\" \u003e\u003e \"$GITHUB_OUTPUT\"\n      - name: Setup Pages\n        uses: actions/configure-pages@v5\n      - name: Upload artifact\n        uses: actions/upload-pages-artifact@v3\n        with:\n          path: \"dist\"\n      - name: Deploy to GitHub Pages\n        id: deployment\n        uses: actions/deploy-pages@v4\n      - name: Commit and push results\n        run: |\n          git config user.name \"github-actions[bot]\"\n          # https://github.com/actions/checkout?tab=readme-ov-file#push-a-commit-using-the-built-in-token\n          git config user.email \"41898282+github-actions[bot]@users.noreply.github.com\"\n          git add .\n          git commit -m \"add run-${{ steps.run-number.outputs.number }}\"\n          git push\n```\n\nThis will merge PRs and deploy a report to GitHub Pages. It will also push a\ncommit to the repo containing the newly generated output.\n\n🔐 Verifying release artifacts\n---\n\nIn case you get the `mrj` binary directly from a [release][1], you may want\nto verify its authenticity. Checksums are applied to all released artifacts, and\nthe resulting checksum file is attested using [Github Attestations][2].\n\nSteps to verify (replace `A.B.C` in the commands below with the version you\nwant):\n\n1. Download the sha256 checksum file for your platform from the release:\n\n   ```shell\n   curl -sSLO https://github.com/dhth/mrj/releases/download/vA.B.C/mrj-x86_64-unknown-linux-gnu.tar.xz.sha256\n   ```\n\n2. Verify the integrity of the checksum file using [gh][3].\n\n   ```shell\n   gh attestation verify mrj-x86_64-unknown-linux-gnu.tar.xz.sha256 --repo dhth/mrj\n   ```\n\n3. Download the compressed archive you want, and validate its checksum:\n\n   ```shell\n   curl -sSLO https://github.com/dhth/mrj/releases/download/vA.B.C/mrj-x86_64-unknown-linux-gnu.tar.xz\n   sha256sum --ignore-missing -c mrj-x86_64-unknown-linux-gnu.tar.xz.sha256\n   ```\n\n3. If checksum validation goes through, uncompress the archive:\n\n   ```shell\n   tar -xzf mrj-x86_64-unknown-linux-gnu.tar.xz\n   cd mrj-x86_64-unknown-linux-gnu\n   ./mrj -h\n   # profit!\n   ```\n\n[1]: https://dhth.github.io/mrj-runner/index.html\n[2]: https://github.com/dhth/mrj-runner\n[3]: https://github.com/dhth/mrj/releases\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhth%2Fmrj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdhth%2Fmrj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdhth%2Fmrj/lists"}