{"id":13896857,"url":"https://github.com/peter-evans/enable-pull-request-automerge","last_synced_at":"2026-02-05T16:32:26.638Z","repository":{"id":36988945,"uuid":"353914608","full_name":"peter-evans/enable-pull-request-automerge","owner":"peter-evans","description":"A GitHub action to enable auto-merge on a pull request","archived":false,"fork":false,"pushed_at":"2025-12-25T21:02:27.000Z","size":1955,"stargazers_count":133,"open_issues_count":3,"forks_count":26,"subscribers_count":4,"default_branch":"main","last_synced_at":"2026-01-26T16:17:29.506Z","etag":null,"topics":["automation","automerge","github-action","pull-request"],"latest_commit_sha":null,"homepage":"","language":null,"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/peter-evans.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"peter-evans"}},"created_at":"2021-04-02T05:24:44.000Z","updated_at":"2026-01-23T13:43:43.000Z","dependencies_parsed_at":"2024-06-18T12:38:47.585Z","dependency_job_id":"8c008828-f24a-407c-9f6e-9a614a2fe390","html_url":"https://github.com/peter-evans/enable-pull-request-automerge","commit_stats":{"total_commits":95,"total_committers":6,"mean_commits":"15.833333333333334","dds":0.5473684210526315,"last_synced_commit":"15cc64bb1afa41657d1325a39ade0bc0fa2d55d4"},"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"purl":"pkg:github/peter-evans/enable-pull-request-automerge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Fenable-pull-request-automerge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Fenable-pull-request-automerge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Fenable-pull-request-automerge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Fenable-pull-request-automerge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peter-evans","download_url":"https://codeload.github.com/peter-evans/enable-pull-request-automerge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Fenable-pull-request-automerge/sbom","scorecard":{"id":728583,"data":{"date":"2025-08-11","repo":{"name":"github.com/peter-evans/enable-pull-request-automerge","commit":"a59ea044f2aeabb1e63839cf06068655c1d70998"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4,"checks":[{"name":"Code-Review","score":1,"reason":"Found 1/7 approved changesets -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":1,"reason":"2 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 1","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: third-party GitHubAction not pinned by hash: .github/workflows/automerge-dependabot.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/peter-evans/enable-pull-request-automerge/automerge-dependabot.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:79: update your workflow using https://app.stepsecurity.io/secureworkflow/peter-evans/enable-pull-request-automerge/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:82: update your workflow using https://app.stepsecurity.io/secureworkflow/peter-evans/enable-pull-request-automerge/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:92: update your workflow using https://app.stepsecurity.io/secureworkflow/peter-evans/enable-pull-request-automerge/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:22: update your workflow using https://app.stepsecurity.io/secureworkflow/peter-evans/enable-pull-request-automerge/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/peter-evans/enable-pull-request-automerge/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/peter-evans/enable-pull-request-automerge/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/ci.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/peter-evans/enable-pull-request-automerge/ci.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/ci.yml:49: update your workflow using https://app.stepsecurity.io/secureworkflow/peter-evans/enable-pull-request-automerge/ci.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/update-major-version.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/peter-evans/enable-pull-request-automerge/update-major-version.yml/main?enable=pin","Info:   0 out of   7 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   3 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/automerge-dependabot.yml:1","Warn: topLevel 'contents' permission set to 'write': .github/workflows/ci.yml:16","Warn: no topLevel permission defined: .github/workflows/test-required-status-check.yml:1","Warn: no topLevel permission defined: .github/workflows/update-major-version.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 27 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-22T13:41:35.370Z","repository_id":36988945,"created_at":"2025-08-22T13:41:35.370Z","updated_at":"2025-08-22T13:41:35.370Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28950656,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-31T18:30:42.805Z","status":"ssl_error","status_checked_at":"2026-01-31T18:30:19.593Z","response_time":128,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":["automation","automerge","github-action","pull-request"],"created_at":"2024-08-06T18:03:12.099Z","updated_at":"2026-02-05T16:32:26.620Z","avatar_url":"https://github.com/peter-evans.png","language":null,"readme":"# Enable Pull Request Auto-merge\n[![CI](https://github.com/peter-evans/enable-pull-request-automerge/workflows/CI/badge.svg)](https://github.com/peter-evans/enable-pull-request-automerge/actions?query=workflow%3ACI)\n[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-Enable%20Pull%20Request%20Automerge-blue.svg?colorA=24292e\u0026colorB=0366d6\u0026style=flat\u0026longCache=true\u0026logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAM6wAADOsB5dZE0gAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAERSURBVCiRhZG/SsMxFEZPfsVJ61jbxaF0cRQRcRJ9hlYn30IHN/+9iquDCOIsblIrOjqKgy5aKoJQj4O3EEtbPwhJbr6Te28CmdSKeqzeqr0YbfVIrTBKakvtOl5dtTkK+v4HfA9PEyBFCY9AGVgCBLaBp1jPAyfAJ/AAdIEG0dNAiyP7+K1qIfMdonZic6+WJoBJvQlvuwDqcXadUuqPA1NKAlexbRTAIMvMOCjTbMwl1LtI/6KWJ5Q6rT6Ht1MA58AX8Apcqqt5r2qhrgAXQC3CZ6i1+KMd9TRu3MvA3aH/fFPnBodb6oe6HM8+lYHrGdRXW8M9bMZtPXUji69lmf5Cmamq7quNLFZXD9Rq7v0Bpc1o/tp0fisAAAAASUVORK5CYII=)](https://github.com/marketplace/actions/enable-pull-request-automerge)\n\nA GitHub action to [enable auto-merge](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/automatically-merging-a-pull-request) on a pull request.\n\n:warning: There are very specific conditions under which this action will work as expected. See [Conditions](#conditions) for details.\n\n## Usage\n\n| :exclamation:  Using this action is no longer necessary   |\n|-----------------------------------------------------------|\n\nThe same functionality exists in the GitHub CLI. See the documentation [here](https://cli.github.com/manual/gh_pr_merge).\n```yml\n    - name: Enable Pull Request Automerge\n      run: gh pr merge --merge --auto \"1\"\n      env:\n        GH_TOKEN: ${{ secrets.PAT }}\n```\n\nIf you prefer to use this action:\n```yml\n      - uses: peter-evans/enable-pull-request-automerge@v3\n        with:\n          token: ${{ secrets.PAT }}\n          pull-request-number: 1\n```\n\n### Action inputs\n\n| Name | Description | Default |\n| --- | --- | --- |\n| `token` | `GITHUB_TOKEN` (permissions `pull_requests: write`, `contents: write`) or a `repo` scoped [Personal Access Token (PAT)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token). | `GITHUB_TOKEN` |\n| `repository` | The target GitHub repository containing the pull request. | `github.repository` (Current repository) |\n| `pull-request-number` | (**required**) The number of the target pull request | |\n| `merge-method` | The merge method to use. `merge`, `rebase` or `squash`. | `merge` |\n\n### Conditions\n\nThe following conditions must be true for auto-merge to be enabled on a pull request.\n\n1. The target repository must have [Allow auto-merge](https://docs.github.com/en/github/administering-a-repository/managing-auto-merge-for-pull-requests-in-your-repository) enabled in settings.\n2. The pull request `base` must have a branch protection rule with at least one requirement enabled.\n3. The pull request must be in a state where requirements have not yet been satisfied. If the pull request is in a state where it can already be merged, the action will merge it immediately without enabling auto-merge.\n\n### Dependabot example\n\nThe following example will automerge dependabot pull requests.\nNote that if you use the default `GITHUB_TOKEN`, as in the example, the merge will not trigger further workflow runs.\nIf you want to trigger further workflow runs, you will need to use a `repo` scoped [Personal Access Token (PAT)](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).\n\n```yml\nname: Auto-merge Dependabot\non: pull_request\n\npermissions:\n  pull-requests: write\n  contents: write\n\njobs:\n  automerge:\n    runs-on: ubuntu-latest\n    if: github.actor == 'dependabot[bot]'\n    steps:\n      - uses: peter-evans/enable-pull-request-automerge@v3\n        with:\n          pull-request-number: ${{ github.event.pull_request.number }}\n          merge-method: squash\n```\n\n### Create pull request example\n\nIn the following example [create-pull-request](https://github.com/peter-evans/create-pull-request) action is used to create a pull request containing some changes that we want to merge automatically once requirements have been satisfied.\n\n```yml\n      - uses: actions/checkout@v3\n\n      # Make changes to pull request here\n\n      - name: Create Pull Request\n        id: cpr\n        uses: peter-evans/create-pull-request@v3\n        with:\n          token: ${{ secrets.PAT }}\n\n      - name: Enable Pull Request Automerge\n        if: steps.cpr.outputs.pull-request-operation == 'created'\n        uses: peter-evans/enable-pull-request-automerge@v3\n        with:\n          token: ${{ secrets.PAT }}\n          pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}\n          merge-method: squash\n```\n\nIf the \"require pull request reviews\" branch protection has been enabled we can optionally auto-approve the pull request by adding the following step to the example above.\nThe `if` condition makes sure we don't approve multiple times if the workflow executes more than once before the pull request merges.\n\n```yml\n      - name: Auto approve\n        if: steps.cpr.outputs.pull-request-operation == 'created'\n        run: gh pr review --approve \"${{ steps.cpr.outputs.pull-request-number }}\"\n        env:\n          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\n## License\n\n[MIT](LICENSE)\n","funding_links":["https://github.com/sponsors/peter-evans"],"categories":["Others"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-evans%2Fenable-pull-request-automerge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeter-evans%2Fenable-pull-request-automerge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-evans%2Fenable-pull-request-automerge/lists"}