Update README.md

This commit is contained in:
Theis Grønbech Petersen 2021-08-19 16:19:39 +02:00 committed by GitHub
parent 093c191148
commit 9035cd952d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,5 @@
# <img width="24" height="24" src="docs/assets/logo.svg"> Create Pull Request # <img width="24" height="24" src="docs/assets/logo.svg"> Create Pull Request
[![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) [![CI](https://github.com/siteimprove/create-pull-request/workflows/CI/badge.svg)](https://github.com/siteimprove/create-pull-request/actions?query=workflow%3ACI)
[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-Create%20Pull%20Request-blue.svg?colorA=24292e&colorB=0366d6&style=flat&longCache=true&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAM6wAADOsB5dZE0gAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAERSURBVCiRhZG/SsMxFEZPfsVJ61jbxaF0cRQRcRJ9hlYn30IHN/+9iquDCOIsblIrOjqKgy5aKoJQj4O3EEtbPwhJbr6Te28CmdSKeqzeqr0YbfVIrTBKakvtOl5dtTkK+v4HfA9PEyBFCY9AGVgCBLaBp1jPAyfAJ/AAdIEG0dNAiyP7+K1qIfMdonZic6+WJoBJvQlvuwDqcXadUuqPA1NKAlexbRTAIMvMOCjTbMwl1LtI/6KWJ5Q6rT6Ht1MA58AX8Apcqqt5r2qhrgAXQC3CZ6i1+KMd9TRu3MvA3aH/fFPnBodb6oe6HM8+lYHrGdRXW8M9bMZtPXUji69lmf5Cmamq7quNLFZXD9Rq7v0Bpc1o/tp0fisAAAAASUVORK5CYII=)](https://github.com/marketplace/actions/create-pull-request) [![GitHub Marketplace](https://img.shields.io/badge/Marketplace-Create%20Pull%20Request-blue.svg?colorA=24292e&colorB=0366d6&style=flat&longCache=true&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAM6wAADOsB5dZE0gAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAERSURBVCiRhZG/SsMxFEZPfsVJ61jbxaF0cRQRcRJ9hlYn30IHN/+9iquDCOIsblIrOjqKgy5aKoJQj4O3EEtbPwhJbr6Te28CmdSKeqzeqr0YbfVIrTBKakvtOl5dtTkK+v4HfA9PEyBFCY9AGVgCBLaBp1jPAyfAJ/AAdIEG0dNAiyP7+K1qIfMdonZic6+WJoBJvQlvuwDqcXadUuqPA1NKAlexbRTAIMvMOCjTbMwl1LtI/6KWJ5Q6rT6Ht1MA58AX8Apcqqt5r2qhrgAXQC3CZ6i1+KMd9TRu3MvA3aH/fFPnBodb6oe6HM8+lYHrGdRXW8M9bMZtPXUji69lmf5Cmamq7quNLFZXD9Rq7v0Bpc1o/tp0fisAAAAASUVORK5CYII=)](https://github.com/marketplace/actions/create-pull-request)
A GitHub action to create a pull request for changes to your repository in the actions workspace. A GitHub action to create a pull request for changes to your repository in the actions workspace.
@ -31,10 +31,10 @@ Create Pull Request action will:
# Make changes to pull request here # Make changes to pull request here
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v3 uses: siteimprove/create-pull-request@v3
``` ```
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/siteimprove/create-pull-request/releases) version in the format `@v3.x.x`
### Action inputs ### Action inputs
@ -56,18 +56,18 @@ All inputs are **optional**. If not set, sensible defaults will be used.
| `base` | Sets the pull request base branch. | Defaults to the branch checked out in the workflow. | | `base` | Sets the pull request base branch. | Defaults to the branch checked out in the workflow. |
| `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. | | | `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. | |
| `title` | The title of the pull request. | `Changes by create-pull-request action` | | `title` | The title of the pull request. | `Changes by create-pull-request action` |
| `body` | The body of the pull request. | `Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action` | | `body` | The body of the pull request. | `Automated changes by [create-pull-request](https://github.com/siteimprove/create-pull-request) GitHub action` |
| `labels` | A comma or newline-separated list of labels. | | | `labels` | A comma or newline-separated list of labels. | |
| `assignees` | A comma or newline-separated list of assignees (GitHub usernames). | | | `assignees` | A comma or newline-separated list of assignees (GitHub usernames). | |
| `reviewers` | A comma or newline-separated list of reviewers (GitHub usernames) to request a review from. | | | `reviewers` | A comma or newline-separated list of reviewers (GitHub usernames) to request a review from. | |
| `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). | | | `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/siteimprove/create-pull-request/issues/155). | |
| `milestone` | The number of the milestone to associate this pull request with. | | | `milestone` | The number of the milestone to associate this pull request with. | |
| `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` | | `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` |
For self-hosted runners behind a corporate proxy set the `https_proxy` environment variable. For self-hosted runners behind a corporate proxy set the `https_proxy` environment variable.
```yml ```yml
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v3 uses: siteimprove/create-pull-request@v3
env: env:
https_proxy: http://<proxy_address>:<port> https_proxy: http://<proxy_address>:<port>
``` ```
@ -86,7 +86,7 @@ Note that in order to read the step outputs the action step must have an id.
```yml ```yml
- name: Create Pull Request - name: Create Pull Request
id: cpr id: cpr
uses: peter-evans/create-pull-request@v3 uses: siteimprove/create-pull-request@v3
- name: Check outputs - name: Check outputs
run: | run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
@ -131,8 +131,8 @@ Note that the repository must be checked out on a branch with a remote, it won't
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: Create commits - name: Create commits
run: | run: |
git config user.name 'Peter Evans' git config user.name 'Siteimprove'
git config user.email 'peter-evans@users.noreply.github.com' git config user.email 'siteimprove@users.noreply.github.com'
date +%s > report.txt date +%s > report.txt
git commit -am "Modify tracked file during workflow" git commit -am "Modify tracked file during workflow"
date +%s > new-report.txt date +%s > new-report.txt
@ -141,7 +141,7 @@ Note that the repository must be checked out on a branch with a remote, it won't
- name: Uncommitted change - name: Uncommitted change
run: date +%s > report.txt run: date +%s > report.txt
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v3 uses: siteimprove/create-pull-request@v3
``` ```
### Ignoring files ### Ignoring files
@ -150,15 +150,15 @@ If there are files or directories you want to ignore you can simply add them to
### Create a project card ### Create a project card
To 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. To create a project card for the pull request, pass the `pull-request-number` step output to [create-or-update-project-card](https://github.com/siteimprove/create-or-update-project-card) action.
```yml ```yml
- name: Create Pull Request - name: Create Pull Request
id: cpr id: cpr
uses: peter-evans/create-pull-request@v3 uses: siteimprove/create-pull-request@v3
- name: Create or Update Project Card - name: Create or Update Project Card
uses: peter-evans/create-or-update-project-card@v1 uses: siteimprove/create-or-update-project-card@v1
with: with:
project-name: My project project-name: My project
column-name: My column column-name: My column
@ -168,7 +168,7 @@ To create a project card for the pull request, pass the `pull-request-number` st
### Auto-merge ### Auto-merge
Auto-merge can be enabled on a pull request allowing it to be automatically merged once requirements have been satisfied. Auto-merge can be enabled on a pull request allowing it to be automatically merged once requirements have been satisfied.
See [enable-pull-request-automerge](https://github.com/peter-evans/enable-pull-request-automerge) action for usage details. See [enable-pull-request-automerge](https://github.com/siteimprove/enable-pull-request-automerge) action for usage details.
## Reference Example ## Reference Example
@ -189,7 +189,7 @@ jobs:
- name: Create Pull Request - name: Create Pull Request
id: cpr id: cpr
uses: peter-evans/create-pull-request@v3 uses: siteimprove/create-pull-request@v3
with: with:
token: ${{ secrets.PAT }} token: ${{ secrets.PAT }}
commit-message: Update report commit-message: Update report
@ -204,12 +204,12 @@ jobs:
- Updated with *today's* date - Updated with *today's* date
- Auto-generated by [create-pull-request][1] - Auto-generated by [create-pull-request][1]
[1]: https://github.com/peter-evans/create-pull-request [1]: https://github.com/siteimprove/create-pull-request
labels: | labels: |
report report
automated pr automated pr
assignees: peter-evans assignees: siteimprove
reviewers: peter-evans reviewers: siteimprove
team-reviewers: | team-reviewers: |
owners owners
maintainers maintainers