-
-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: update action runtime to node 16 * feat: allow add-paths to resolve to no changes * docs: update readme * chore: update package lock * chore: bump dependency * ci: add dependabot workflow * docs: update action versions
- Loading branch information
1 parent
0e8dfbd
commit d6d5519
Showing
15 changed files
with
291 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" | ||
labels: | ||
- "dependencies" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,20 +21,20 @@ Create Pull Request action will: | |
|
||
- [Concepts, guidelines and advanced usage](docs/concepts-guidelines.md) | ||
- [Examples](docs/examples.md) | ||
- [Updating to v3](docs/updating.md) | ||
- [Updating to v4](docs/updating.md) | ||
|
||
## Usage | ||
|
||
```yml | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
|
||
# Make changes to pull request here | ||
|
||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
uses: peter-evans/create-pull-request@v4 | ||
``` | ||
You can also pin to a [specific release](https://github.com/peter-evans/create-pull-request/releases) version in the format `@v3.x.x` | ||
You can also pin to a [specific release](https://github.com/peter-evans/create-pull-request/releases) version in the format `@v4.x.x` | ||
|
||
### Action inputs | ||
|
||
|
@@ -46,7 +46,7 @@ All inputs are **optional**. If not set, sensible defaults will be used. | |
| --- | --- | --- | | ||
| `token` | `GITHUB_TOKEN` (permissions `contents: write` and `pull-requests: write`) or a `repo` scoped [Personal Access Token (PAT)](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token). | `GITHUB_TOKEN` | | ||
| `path` | Relative path under `GITHUB_WORKSPACE` to the repository. | `GITHUB_WORKSPACE` | | ||
| `add-paths` | A comma or newline-separated list of file paths to commit. Paths should follow git's [pathspec](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec) syntax. Defaults to adding all new and modified files. See [Add specific paths](#add-specific-paths). | `-A` | | ||
| `add-paths` | A comma or newline-separated list of file paths to commit. Paths should follow git's [pathspec](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec) syntax. If no paths are specified, all new and modified files are added. See [Add specific paths](#add-specific-paths). | | | ||
| `commit-message` | The message to use when committing changes. | `[create-pull-request] automated change` | | ||
| `committer` | The committer name and email address in the format `Display Name <[email protected]>`. Defaults to the GitHub Actions bot user. | `GitHub <[email protected]>` | | ||
| `author` | The author name and email address in the format `Display Name <[email protected]>`. Defaults to the user who triggered the workflow run. | `${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>` | | ||
|
@@ -68,7 +68,7 @@ All inputs are **optional**. If not set, sensible defaults will be used. | |
For self-hosted runners behind a corporate proxy set the `https_proxy` environment variable. | ||
```yml | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
uses: peter-evans/create-pull-request@v4 | ||
env: | ||
https_proxy: http://<proxy_address>:<port> | ||
``` | ||
|
@@ -88,7 +88,7 @@ Note that in order to read the step outputs the action step must have an id. | |
```yml | ||
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v3 | ||
uses: peter-evans/create-pull-request@v4 | ||
- name: Check outputs | ||
if: ${{ steps.cpr.outputs.pull-request-number }} | ||
run: | | ||
|
@@ -147,12 +147,11 @@ If there are files or directories you want to ignore you can simply add them to | |
|
||
You can control which files are committed with the `add-paths` input. | ||
Paths should follow git's [pathspec](https://git-scm.com/docs/gitglossary#Documentation/gitglossary.txt-aiddefpathspecapathspec) syntax. | ||
Each path must resolve to a least one new or modified file to add. | ||
All file changes that do not match one of the paths will be discarded. | ||
|
||
```yml | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
add-paths: | | ||
*.java | ||
|
@@ -166,7 +165,7 @@ Note that the repository must be checked out on a branch with a remote, it won't | |
|
||
```yml | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Create commits | ||
run: | | ||
git config user.name 'Peter Evans' | ||
|
@@ -179,7 +178,7 @@ Note that the repository must be checked out on a branch with a remote, it won't | |
- name: Uncommitted change | ||
run: date +%s > report.txt | ||
- name: Create Pull Request | ||
uses: peter-evans/create-pull-request@v3 | ||
uses: peter-evans/create-pull-request@v4 | ||
``` | ||
|
||
### Create a project card | ||
|
@@ -189,11 +188,11 @@ To create a project card for the pull request, pass the `pull-request-number` st | |
```yml | ||
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v3 | ||
uses: peter-evans/create-pull-request@v4 | ||
- name: Create or Update Project Card | ||
if: ${{ steps.cpr.outputs.pull-request-number }} | ||
uses: peter-evans/create-or-update-project-card@v1 | ||
uses: peter-evans/create-or-update-project-card@v2 | ||
with: | ||
project-name: My project | ||
column-name: My column | ||
|
@@ -217,14 +216,14 @@ jobs: | |
createPullRequest: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v3 | ||
- name: Make changes to pull request | ||
run: date +%s > report.txt | ||
- name: Create Pull Request | ||
id: cpr | ||
uses: peter-evans/create-pull-request@v3 | ||
uses: peter-evans/create-pull-request@v4 | ||
with: | ||
token: ${{ secrets.PAT }} | ||
commit-message: Update report | ||
|
Oops, something went wrong.