* feat: restore working base branch and uncommitted changes * docs: uncommitted changes are stashed and restored * docs: add major version notes * fix: update package version * fix: update package-lock * feat: revise proxy implementation * docs: add notes for the revised proxy implementation * feat: set and remove git safe directory * docs: add notes for the git safe directory feature * fix: use base url for proxy check * feat: determine the git dir with rev-parse * build: update package lock * fix: remove support for ghes alpha * feat: revise handling of team reviewers * docs: update notes * feat: body-path * docs: update to v5 * docs: update to v5 * build: fix package lock
6.0 KiB
Updating from v4 to v5
Behaviour changes
- The action will no longer leave the local repository checked out on the pull request
branch. Instead, it will leave the repository checked out on the branch or commit that it was when the action started. - When using
add-paths, uncommitted changes will no longer be destroyed. They will be stashed and restored at the end of the action run.
What's new
- Adds input
body-path, the path to a file containing the pull request body. - At the end of the action run the local repository is now checked out on the branch or commit that it was when the action started.
- Any uncommitted tracked or untracked changes are now stashed and restored at the end of the action run. Currently, this can only occur when using the
add-pathsinput, which allows for changes to not be committed. Previously, any uncommitted changes would be destroyed. - The proxy implementation has been revised but is not expected to have any change in behaviour. It continues to support the standard environment variables
http_proxy,https_proxyandno_proxy. - Now sets the git
safe.directoryconfiguration for the local repository path. The configuration is removed when the action completes. Fixes issue https://github.com/peter-evans/create-pull-request/issues/1170. - Now determines the git directory path using the
git rev-parse --git-dircommand. This allows users with custom repository configurations to use the action. - Improved handling of the
team-reviewersinput and associated errors.
Updating from v3 to v4
Behaviour changes
-
The
add-pathsinput no longer accepts-Aas a valid value. When committing all new and modified files theadd-pathsinput should be omitted. -
If using self-hosted runners or GitHub Enterprise Server, there are minimum requirements for
v4to run. See "What's new" below for details.
What's new
- Updated runtime to Node.js 16
- The action now requires a minimum version of v2.285.0 for the Actions Runner.
- If using GitHub Enterprise Server, the action requires GHES 3.4 or later.
Updating from v2 to v3
Behaviour changes
-
The
authorinput now defaults to the user who triggered the workflow run. This default is set via action.yml as${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>, wheregithub.actoris the GitHub user account associated with the run. For example,peter-evans <peter-evans@users.noreply.github.com>.To continue to use the
v2default, set theauthorinput as follows.- uses: peter-evans/create-pull-request@v3 with: author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> -
The
authorandcommitterinputs are no longer cross-used if only one is supplied. Additionally, when neither input is set, theauthorandcommitterare no longer determined from an existing identity set in git config. In both cases, the inputs will fall back to their default set in action.yml. -
Deprecated inputs
projectandproject-columnhave been removed in favour of an additional action step. See Create a project card for details. -
Deprecated output
pr_numberhas been removed in favour ofpull-request-number. -
Input
request-to-parenthas been removed in favour ofpush-to-fork. This greatly simplifies pushing the pull request branch to a fork of the parent repository. See Push pull request branches to a fork for details.e.g.
- uses: actions/checkout@v2 # Make changes to pull request here - uses: peter-evans/create-pull-request@v3 with: token: ${{ secrets.MACHINE_USER_PAT }} push-to-fork: machine-user/fork-of-repository
What's new
-
The action has been converted to Typescript giving it a significant performance improvement.
-
If you run this action in a container, or on self-hosted runners,
pythonandpipare no longer required dependencies. See Running in a container or on self-hosted runners for details. -
Inputs
labels,assignees,reviewersandteam-reviewerscan now be newline separated, or comma separated. e.g.labels: | chore dependencies automated
Updating from v1 to v2
Behaviour changes
-
v2now expects repositories to be checked out withactions/checkout@v2To use
actions/checkout@v1the following step to checkout the branch is necessary.- uses: actions/checkout@v1 - name: Checkout branch run: git checkout "${GITHUB_REF:11}" -
The two branch naming strategies have been swapped. Fixed-branch naming strategy is now the default. i.e.
branch-suffix: noneis now the default and should be removed from configuration if set. -
author-name,author-email,committer-name,committer-emailhave been removed in favour ofauthorandcommitter. They can both be set in the formatDisplay Name <email@address.com>If neither
authororcommitterare set the action will default to making commits as the GitHub Actions bot user.
What's new
- Unpushed commits made during the workflow before the action runs will now be considered as changes to be raised in the pull request. See Create your own commits for details.
- New commits made to the pull request base will now be taken into account when pull requests are updated.
- If an updated pull request no longer differs from its base it will automatically be closed and the pull request branch deleted.