{"id":15659645,"url":"https://github.com/peter-evans/close-pull","last_synced_at":"2026-01-08T07:08:03.941Z","repository":{"id":42171672,"uuid":"260609651","full_name":"peter-evans/close-pull","owner":"peter-evans","description":"A GitHub action to close a pull request and optionally delete its branch.","archived":false,"fork":false,"pushed_at":"2024-09-07T21:30:21.000Z","size":1137,"stargazers_count":22,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-16T13:17:09.521Z","etag":null,"topics":["automation","close-pull","close-pull-request","github-action","workflow"],"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":".github/FUNDING.yml","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},"funding":{"github":"peter-evans"}},"created_at":"2020-05-02T03:56:35.000Z","updated_at":"2024-11-27T08:38:02.000Z","dependencies_parsed_at":"2024-09-07T22:35:24.376Z","dependency_job_id":"96dc8330-4ca3-4e21-8fe7-177f25b6e451","html_url":"https://github.com/peter-evans/close-pull","commit_stats":{"total_commits":152,"total_committers":7,"mean_commits":"21.714285714285715","dds":0.611842105263158,"last_synced_commit":"f53f90e34c0a2765678633a66069a0f10a2c57fd"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Fclose-pull","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Fclose-pull/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Fclose-pull/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/peter-evans%2Fclose-pull/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/peter-evans","download_url":"https://codeload.github.com/peter-evans/close-pull/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246269911,"owners_count":20750319,"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":["automation","close-pull","close-pull-request","github-action","workflow"],"created_at":"2024-10-03T13:17:59.479Z","updated_at":"2026-01-08T07:08:03.915Z","avatar_url":"https://github.com/peter-evans.png","language":null,"funding_links":["https://github.com/sponsors/peter-evans"],"categories":[],"sub_categories":[],"readme":"# Close Pull\n[![CI](https://github.com/peter-evans/close-pull/workflows/CI/badge.svg)](https://github.com/peter-evans/close-pull/actions?query=workflow%3ACI)\n[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-Close%20Pull-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/close-pull)\n\nA GitHub action to close a pull request and optionally delete its branch.\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_close).\n```yml\n    - name: Close Pull\n      run: gh pr close --comment \"Auto-closing pull request\" --delete-branch \"1\"\n      env:\n        GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}\n```\n\nIf you prefer to use this action:\n```yml\n      - name: Close Pull\n        uses: peter-evans/close-pull@v3\n        with:\n          pull-request-number: 1\n          comment: Auto-closing pull request\n          delete-branch: true\n```\n\n### Action inputs\n\n| Name | Description | Default |\n| --- | --- | --- |\n| `token` | `GITHUB_TOKEN` or a `repo` scoped [PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). | `GITHUB_TOKEN` |\n| `repository` | The GitHub repository containing the pull request. | Current repository |\n| `pull-request-number` | The number of the pull request to close. | `github.event.number` |\n| `comment` | A comment to make on the pull request before closing. | |\n| `delete-branch` | Delete the pull request branch. | `false` |\n\nNote: Deleting branches will fail silently for pull requests to public repositories from forks.\nPrivate repositories can be configured to [enable workflows](https://docs.github.com/en/github/administering-a-repository/disabling-or-limiting-github-actions-for-a-repository#enabling-workflows-for-private-repository-forks) from forks to run without restriction.\n\n### Accessing pull requests in other repositories\n\nYou can close pull requests in another repository by using a [PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) instead of `GITHUB_TOKEN`.\nThe user associated with the PAT must have write access to the repository.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-evans%2Fclose-pull","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpeter-evans%2Fclose-pull","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpeter-evans%2Fclose-pull/lists"}