Update README
This commit is contained in:
parent
5f9821866a
commit
fbe0cd3d1a
38
README.md
38
README.md
|
@ -10,7 +10,7 @@ The changes will be automatically committed to a new branch and a pull request c
|
|||
Create Pull Request action will:
|
||||
|
||||
1. Check for repository changes in the Actions workspace. This includes untracked (new) files as well as modified files.
|
||||
2. Commit all changes to a new branch, or update an existing pull request branch. The commit will be made using the name and email of the `HEAD` commit author.
|
||||
2. Commit all changes to a new branch, or update an existing pull request branch.
|
||||
3. Create a pull request to merge the new branch into the currently active branch executing the workflow.
|
||||
|
||||
## Usage
|
||||
|
@ -18,7 +18,7 @@ Create Pull Request action will:
|
|||
Linux
|
||||
```yml
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v1.5.0
|
||||
uses: peter-evans/create-pull-request@v1.5.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
@ -26,7 +26,7 @@ Linux
|
|||
Multi platform - Linux, MacOS, Windows (beta)
|
||||
```yml
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v1.5.0-multi
|
||||
uses: peter-evans/create-pull-request@v1.5.1-multi
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
@ -36,18 +36,22 @@ See [this issue](https://github.com/peter-evans/create-pull-request/issues/48) f
|
|||
|
||||
### Environment variables
|
||||
|
||||
These variables are all optional. If not set, a default value will be used.
|
||||
These variables are *all optional*. If not set, sensible default values will be used.
|
||||
|
||||
- `COMMIT_MESSAGE` - The message to use when committing changes.
|
||||
- `PULL_REQUEST_TITLE` - The title of the pull request.
|
||||
- `PULL_REQUEST_BODY` - The body of the pull request.
|
||||
- `PULL_REQUEST_LABELS` - A comma separated list of labels.
|
||||
- `PULL_REQUEST_ASSIGNEES` - A comma separated list of assignees (GitHub usernames).
|
||||
- `PULL_REQUEST_REVIEWERS` - A comma separated list of reviewers (GitHub usernames) to request a review from.
|
||||
- `PULL_REQUEST_TEAM_REVIEWERS` - A comma separated list of GitHub teams to request a review from.
|
||||
- `PULL_REQUEST_MILESTONE` - The number of the milestone to associate this pull request with.
|
||||
- `PULL_REQUEST_BRANCH` - The branch name. See **Branch naming** below for details.
|
||||
- `BRANCH_SUFFIX` - The branch suffix type. Valid values are `short-commit-hash` (default), `timestamp`, `random` and `none`. See **Branch naming** below for details.
|
||||
| Name | Description | Default |
|
||||
| --- | --- | --- |
|
||||
| `COMMIT_MESSAGE` | The message to use when committing changes. | `Auto-committed changes by create-pull-request action` |
|
||||
| `COMMIT_AUTHOR_EMAIL` | The email address of the commit author. | For `push` events, defaults to the HEAD commit author. Otherwise, <GITHUB_ACTOR>@users.noreply.github.com, where `GITHUB_ACTOR` is the GitHub user that initiated the event. |
|
||||
| `COMMIT_AUTHOR_NAME` | The name of the commit author. | For `push` events, defaults to the HEAD commit author. Otherwise, <GITHUB_ACTOR>, the GitHub user that initiated the event. |
|
||||
| `PULL_REQUEST_TITLE` | The title of the pull request. | `Auto-generated by create-pull-request action` |
|
||||
| `PULL_REQUEST_BODY` | The body of the pull request. | `Auto-generated pull request by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub Action` |
|
||||
| `PULL_REQUEST_LABELS` | A comma separated list of labels. | `none` |
|
||||
| `PULL_REQUEST_ASSIGNEES` | A comma separated list of assignees (GitHub usernames). | `none` |
|
||||
| `PULL_REQUEST_REVIEWERS` | A comma separated list of reviewers (GitHub usernames) to request a review from. | `none` |
|
||||
| `PULL_REQUEST_TEAM_REVIEWERS` | A comma separated list of GitHub teams to request a review from. | `none` |
|
||||
| `PULL_REQUEST_MILESTONE` | The number of the milestone to associate this pull request with. | `none` |
|
||||
| `PULL_REQUEST_BRANCH` | The branch name. See **Branch naming** below for details. | `create-pull-request/patch` |
|
||||
| `BRANCH_SUFFIX` | The branch suffix type. Valid values are `short-commit-hash`, `timestamp`, `random` and `none`. See **Branch naming** below for details. | `short-commit-hash` |
|
||||
|
||||
Output environment variables
|
||||
|
||||
|
@ -98,7 +102,7 @@ jobs:
|
|||
- name: Create report file
|
||||
run: date +%s > report.txt
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v1.5.0
|
||||
uses: peter-evans/create-pull-request@v1.5.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
COMMIT_MESSAGE: Add report file
|
||||
|
@ -134,7 +138,7 @@ The recommended method is to use `set-output`. Note that the step where output v
|
|||
echo ::set-output name=pr_body::"This PR was auto-generated on $(date +%d-%m-%Y) \
|
||||
by [create-pull-request](https://github.com/peter-evans/create-pull-request)."
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v1.5.0
|
||||
uses: peter-evans/create-pull-request@v1.5.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
PULL_REQUEST_TITLE: ${{ steps.vars.outputs.pr_title }}
|
||||
|
@ -150,7 +154,7 @@ Since the action reads environment variables from the system, it's technically n
|
|||
echo ::set-env name=PULL_REQUEST_BODY::"This PR was auto-generated on $(date +%d-%m-%Y) \
|
||||
by [create-pull-request](https://github.com/peter-evans/create-pull-request)."
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v1.5.0
|
||||
uses: peter-evans/create-pull-request@v1.5.1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue