{"id":15013139,"url":"https://github.com/tauri-apps/create-pull-request","last_synced_at":"2025-10-06T07:30:21.468Z","repository":{"id":65155735,"uuid":"255015524","full_name":"tauri-apps/create-pull-request","owner":"tauri-apps","description":"A GitHub action to create a pull request for changes to your repository in the actions workspace.","archived":false,"fork":true,"pushed_at":"2024-06-04T20:21:12.000Z","size":24181,"stargazers_count":4,"open_issues_count":3,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T21:06:05.723Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"peter-evans/create-pull-request","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tauri-apps.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}},"created_at":"2020-04-12T05:30:21.000Z","updated_at":"2024-04-02T08:20:28.000Z","dependencies_parsed_at":"2023-09-21T15:32:59.238Z","dependency_job_id":null,"html_url":"https://github.com/tauri-apps/create-pull-request","commit_stats":{"total_commits":422,"total_committers":15,"mean_commits":"28.133333333333333","dds":"0.16824644549763035","last_synced_commit":"0fd77ba8cc62a99a51b9c5596ca941a84442bd41"},"previous_names":[],"tags_count":73,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Fcreate-pull-request","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Fcreate-pull-request/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Fcreate-pull-request/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tauri-apps%2Fcreate-pull-request/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tauri-apps","download_url":"https://codeload.github.com/tauri-apps/create-pull-request/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235270951,"owners_count":18963324,"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":"2024-09-24T19:43:48.277Z","updated_at":"2025-10-06T07:30:16.152Z","avatar_url":"https://github.com/tauri-apps.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg width=\"24\" height=\"24\" src=\"docs/assets/logo.svg\"\u003e Create Pull Request\n[![CI](https://github.com/peter-evans/create-pull-request/workflows/CI/badge.svg)](https://github.com/peter-evans/create-pull-request/actions?query=workflow%3ACI)\n[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-Create%20Pull%20Request-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/create-pull-request)\n\nA GitHub action to create a pull request for changes to your repository in the actions workspace.\n\nChanges to a repository in the Actions workspace persist between steps in a workflow.\nThis action is designed to be used in conjunction with other steps that modify or add files to your repository.\nThe changes will be automatically committed to a new branch and a pull request created.\n\nCreate Pull Request action will:\n\n1. Check for repository changes in the Actions workspace. This includes:\n   - untracked (new) files\n   - tracked (modified) files\n   - commits made during the workflow that have not been pushed\n2. Commit all changes to a new branch, or update an existing pull request branch.\n3. Create a pull request to merge the new branch into the base\u0026mdash;the branch checked out in the workflow.\n\n## Documentation\n\n- [Concepts, guidelines and advanced usage](docs/concepts-guidelines.md)\n- [Examples](docs/examples.md)\n- [Updating to v3](docs/updating.md)\n\n## Usage\n\n```yml\n      - uses: actions/checkout@v2\n\n      # Make changes to pull request here\n\n      - name: Create Pull Request\n        uses: peter-evans/create-pull-request@v3\n```\n\nYou can also pin to a [specific release](https://github.com/peter-evans/create-pull-request/releases) version in the format `@v3.x.x`\n\n### Action inputs\n\nAll inputs are **optional**. If not set, sensible defaults will be used.\n\n**Note**: If you want pull requests created by this action to trigger an `on: push` or `on: pull_request` workflow then you cannot use the default `GITHUB_TOKEN`. See the [documentation here](docs/concepts-guidelines.md#triggering-further-workflow-runs) for workarounds.\n\n| Name | Description | Default |\n| --- | --- | --- |\n| `token` | `GITHUB_TOKEN` or a `repo` scoped [Personal Access Token (PAT)](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). | `GITHUB_TOKEN` |\n| `path` | Relative path under `GITHUB_WORKSPACE` to the repository. | `GITHUB_WORKSPACE` |\n| `commit-message` | The message to use when committing changes. | `[create-pull-request] automated change` |\n| `committer` | The committer name and email address in the format `Display Name \u003cemail@address.com\u003e`. Defaults to the GitHub Actions bot user. | `GitHub \u003cnoreply@github.com\u003e` |\n| `author` | The author name and email address in the format `Display Name \u003cemail@address.com\u003e`. Defaults to the user who triggered the workflow run. | `${{ github.actor }} \u003c${{ github.actor }}@users.noreply.github.com\u003e` |\n| `signoff` | Add [`Signed-off-by`](https://git-scm.com/docs/git-commit#Documentation/git-commit.txt---signoff) line by the committer at the end of the commit log message. | `false` |\n| `branch` | The pull request branch name. | `create-pull-request/patch` |\n| `delete-branch` | Delete the `branch` when closing pull requests, and when undeleted after merging. Recommend `true`. | `false` |\n| `branch-suffix` | The branch suffix type when using the alternative branching strategy. Valid values are `random`, `timestamp` and `short-commit-hash`. See [Alternative strategy](#alternative-strategy---always-create-a-new-pull-request-branch) for details. | |\n| `base` | Sets the pull request base branch. | Defaults to the branch checked out in the workflow. |\n| `push-to-fork` | A fork of the checked-out parent repository to which the pull request branch will be pushed. e.g. `owner/repo-fork`. The pull request will be created to merge the fork's branch into the parent's base. See [push pull request branches to a fork](docs/concepts-guidelines.md#push-pull-request-branches-to-a-fork) for details. | |\n| `title` | The title of the pull request. | `Changes by create-pull-request action` |\n| `body` | The body of the pull request. | `Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action` |\n| `labels` | A comma or newline-separated list of labels. | |\n| `assignees` | A comma or newline-separated list of assignees (GitHub usernames). | |\n| `reviewers` | A comma or newline-separated list of reviewers (GitHub usernames) to request a review from. | |\n| `team-reviewers` | A comma or newline-separated list of GitHub teams to request a review from. Note that a `repo` scoped [PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) may be required. See [this issue](https://github.com/peter-evans/create-pull-request/issues/155). | |\n| `milestone` | The number of the milestone to associate this pull request with. | |\n| `draft` | Create a [draft pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests). | `false` |\n\n### Action outputs\n\nThe pull request number and URL are available as step outputs.\nNote that in order to read the step outputs the action step must have an id.\n\n```yml\n      - name: Create Pull Request\n        id: cpr\n        uses: peter-evans/create-pull-request@v3\n      - name: Check outputs\n        run: |\n          echo \"Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}\"\n          echo \"Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}\"\n```\n\n### Action behaviour\n\nThe default behaviour of the action is to create a pull request that will be continually updated with new changes until it is merged or closed.\nChanges are committed and pushed to a fixed-name branch, the name of which can be configured with the `branch` input.\nAny subsequent changes will be committed to the *same* branch and reflected in the open pull request.\n\nHow the action behaves:\n\n- If there are changes (i.e. a diff exists with the checked-out base branch), the changes will be pushed to a new `branch` and a pull request created.\n- If there are no changes (i.e. no diff exists with the checked-out base branch), no pull request will be created and the action exits silently.\n- If a pull request already exists and there are no further changes (i.e. no diff with the current pull request branch) then the action exits silently.\n- If a pull request exists and new changes on the base branch make the pull request unnecessary (i.e. there is no longer a diff between the pull request branch and the base), the pull request is automatically closed. Additionally, if `delete-branch` is set to `true` the `branch` will be deleted.\n\nFor further details about how the action works and usage guidelines, see [Concepts, guidelines and advanced usage](docs/concepts-guidelines.md).\n\n#### Alternative strategy - Always create a new pull request branch\n\nFor some use cases it may be desirable to always create a new unique branch each time there are changes to be committed.\nThis strategy is *not recommended* because if not used carefully it could result in multiple pull requests being created unnecessarily. If in doubt, use the [default strategy](#action-behaviour) of creating an updating a fixed-name branch.\n\nTo use this strategy, set input `branch-suffix` with one of the following options.\n\n- `random` - Commits will be made to a branch suffixed with a random alpha-numeric string. e.g. `create-pull-request/patch-6qj97jr`, `create-pull-request/patch-5jrjhvd`\n\n- `timestamp` - Commits will be made to a branch suffixed by a timestamp. e.g. `create-pull-request/patch-1569322532`, `create-pull-request/patch-1569322552`\n\n- `short-commit-hash` - Commits will be made to a branch suffixed with the short SHA1 commit hash. e.g. `create-pull-request/patch-fcdfb59`, `create-pull-request/patch-394710b`\n\n### Controlling commits\n\nAs well as relying on the action to handle uncommitted changes, you can additionally make your own commits before the action runs.\nNote that the repository must be checked out on a branch with a remote, it won't work for [events which checkout a commit](docs/concepts-guidelines.md#events-which-checkout-a-commit).\n\n```yml\n    steps:\n      - uses: actions/checkout@v2\n      - name: Create commits\n        run: |\n          git config user.name 'Peter Evans'\n          git config user.email 'peter-evans@users.noreply.github.com'\n          date +%s \u003e report.txt\n          git commit -am \"Modify tracked file during workflow\"\n          date +%s \u003e new-report.txt\n          git add -A\n          git commit -m \"Add untracked file during workflow\"\n      - name: Uncommitted change\n        run: date +%s \u003e report.txt\n      - name: Create Pull Request\n        uses: peter-evans/create-pull-request@v3\n```\n\n### Ignoring files\n\nIf there are files or directories you want to ignore you can simply add them to a `.gitignore` file at the root of your repository. The action will respect this file.\n\n### Create a project card\n\nTo create a project card for the pull request, pass the `pull-request-number` step output to [create-or-update-project-card](https://github.com/peter-evans/create-or-update-project-card) action.\n\n```yml\n      - name: Create Pull Request\n        id: cpr\n        uses: peter-evans/create-pull-request@v3\n\n      - name: Create or Update Project Card\n        uses: peter-evans/create-or-update-project-card@v1\n        with:\n          project-name: My project\n          column-name: My column\n          issue-number: ${{ steps.cpr.outputs.pull-request-number }}\n```\n\n## Reference Example\n\nThe following workflow sets many of the action's inputs for reference purposes.\nCheck the [defaults](#action-inputs) to avoid setting inputs unnecessarily.\n\nSee [examples](docs/examples.md) for more realistic use cases.\n\n```yml\njobs:\n  createPullRequest:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v2\n\n      - name: Make changes to pull request\n        run: date +%s \u003e report.txt\n\n      - name: Create Pull Request\n        id: cpr\n        uses: peter-evans/create-pull-request@v3\n        with:\n          token: ${{ secrets.PAT }}\n          commit-message: Update report\n          committer: GitHub \u003cnoreply@github.com\u003e\n          author: ${{ github.actor }} \u003c${{ github.actor }}@users.noreply.github.com\u003e\n          signoff: false\n          branch: example-patches\n          delete-branch: true\n          title: '[Example] Update report'\n          body: |\n            Update report\n            - Updated with *today's* date\n            - Auto-generated by [create-pull-request][1]\n\n            [1]: https://github.com/peter-evans/create-pull-request\n          labels: |\n            report\n            automated pr\n          assignees: peter-evans\n          reviewers: peter-evans\n          team-reviewers: |\n            owners\n            maintainers\n          milestone: 1\n          draft: false\n\n      - name: Check outputs\n        run: |\n          echo \"Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}\"\n          echo \"Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}\"\n```\n\nAn example based on the above reference configuration creates pull requests that look like this:\n\n![Pull Request Example](docs/assets/pull-request-example.png)\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftauri-apps%2Fcreate-pull-request","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftauri-apps%2Fcreate-pull-request","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftauri-apps%2Fcreate-pull-request/lists"}