Skip to content

Commit 5b4a9f6

Browse files
authored
v5 (#1792)
* 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
1 parent 1847e5d commit 5b4a9f6

24 files changed

+6520
-65060
lines changed

.github/workflows/update-major-version.yml

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ on:
1212
description: The major version tag to update
1313
options:
1414
- v4
15+
- v5
1516

1617
jobs:
1718
tag:

README.md

+14-13
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Create Pull Request action will:
2121

2222
- [Concepts, guidelines and advanced usage](docs/concepts-guidelines.md)
2323
- [Examples](docs/examples.md)
24-
- [Updating to v4](docs/updating.md)
24+
- [Updating to v5](docs/updating.md)
2525

2626
## Usage
2727

@@ -31,10 +31,10 @@ Create Pull Request action will:
3131
# Make changes to pull request here
3232

3333
- name: Create Pull Request
34-
uses: peter-evans/create-pull-request@v4
34+
uses: peter-evans/create-pull-request@v5
3535
```
3636
37-
You can also pin to a [specific release](https://github.com/peter-evans/create-pull-request/releases) version in the format `@v4.x.x`
37+
You can also pin to a [specific release](https://github.com/peter-evans/create-pull-request/releases) version in the format `@v5.x.x`
3838

3939
### Workflow permissions
4040

@@ -65,17 +65,18 @@ All inputs are **optional**. If not set, sensible defaults will be used.
6565
| `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. | |
6666
| `title` | The title of the pull request. | `Changes by create-pull-request action` |
6767
| `body` | The body of the pull request. | `Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action` |
68+
| `body-path` | The path to a file containing the pull request body. Takes precedence over `body`. | |
6869
| `labels` | A comma or newline-separated list of labels. | |
6970
| `assignees` | A comma or newline-separated list of assignees (GitHub usernames). | |
7071
| `reviewers` | A comma or newline-separated list of reviewers (GitHub usernames) to request a review from. | |
71-
| `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). If using a GitHub App, refer to [Authenticating with GitHub App generated tokens](docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens) for the proper permissions. | |
72+
| `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), or equivalent [GitHub App permissions](docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens), are required. | |
7273
| `milestone` | The number of the milestone to associate this pull request with. | |
7374
| `draft` | Create a [draft pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests). It is not possible to change draft status after creation except through the web interface. | `false` |
7475

7576
For self-hosted runners behind a corporate proxy set the `https_proxy` environment variable.
7677
```yml
7778
- name: Create Pull Request
78-
uses: peter-evans/create-pull-request@v4
79+
uses: peter-evans/create-pull-request@v5
7980
env:
8081
https_proxy: http://<proxy_address>:<port>
8182
```
@@ -95,7 +96,7 @@ Note that in order to read the step outputs the action step must have an id.
9596
```yml
9697
- name: Create Pull Request
9798
id: cpr
98-
uses: peter-evans/create-pull-request@v4
99+
uses: peter-evans/create-pull-request@v5
99100
- name: Check outputs
100101
if: ${{ steps.cpr.outputs.pull-request-number }}
101102
run: |
@@ -154,11 +155,11 @@ If there are files or directories you want to ignore you can simply add them to
154155

155156
You can control which files are committed with the `add-paths` input.
156157
Paths should follow git's [pathspec](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec) syntax.
157-
All file changes that do not match one of the paths will be discarded.
158+
File changes that do not match one of the paths will be stashed and restored after the action has completed.
158159

159160
```yml
160161
- name: Create Pull Request
161-
uses: peter-evans/create-pull-request@v4
162+
uses: peter-evans/create-pull-request@v5
162163
with:
163164
add-paths: |
164165
*.java
@@ -185,7 +186,7 @@ Note that the repository must be checked out on a branch with a remote, it won't
185186
- name: Uncommitted change
186187
run: date +%s > report.txt
187188
- name: Create Pull Request
188-
uses: peter-evans/create-pull-request@v4
189+
uses: peter-evans/create-pull-request@v5
189190
```
190191

191192
### Create a project card
@@ -195,7 +196,7 @@ To create a project card for the pull request, pass the `pull-request-number` st
195196
```yml
196197
- name: Create Pull Request
197198
id: cpr
198-
uses: peter-evans/create-pull-request@v4
199+
uses: peter-evans/create-pull-request@v5
199200
200201
- name: Create or Update Project Card
201202
if: ${{ steps.cpr.outputs.pull-request-number }}
@@ -230,7 +231,7 @@ jobs:
230231
231232
- name: Create Pull Request
232233
id: cpr
233-
uses: peter-evans/create-pull-request@v4
234+
uses: peter-evans/create-pull-request@v5
234235
with:
235236
token: ${{ secrets.PAT }}
236237
commit-message: Update report
@@ -252,8 +253,8 @@ jobs:
252253
assignees: peter-evans
253254
reviewers: peter-evans
254255
team-reviewers: |
255-
owners
256-
maintainers
256+
developers
257+
qa-team
257258
milestone: 1
258259
draft: false
259260
```

0 commit comments

Comments
 (0)