diff --git a/README.md b/README.md index 062795a..4155e84 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ See [examples](examples.md) for detailed use cases. ```yml - name: Create Pull Request - uses: peter-evans/create-pull-request@v1.7.0 + uses: peter-evans/create-pull-request@v1.7.1 with: token: ${{ secrets.GITHUB_TOKEN }} ``` @@ -55,7 +55,7 @@ Note that in order to read the step output the action step must have an id. ```yml - name: Create Pull Request id: cpr - uses: peter-evans/create-pull-request@v1.7.0 + uses: peter-evans/create-pull-request@v1.7.1 with: token: ${{ secrets.GITHUB_TOKEN }} - name: Check outputs @@ -105,7 +105,7 @@ jobs: run: date +%s > report.txt - name: Create Pull Request id: cpr - uses: peter-evans/create-pull-request@v1.7.0 + uses: peter-evans/create-pull-request@v1.7.1 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: Add report file diff --git a/dist/src/create-pull-request.py b/dist/src/create-pull-request.py index 51676f8..1f56e5c 100755 --- a/dist/src/create-pull-request.py +++ b/dist/src/create-pull-request.py @@ -120,7 +120,7 @@ def process_event(github_token, github_repository, repo, branch, base): pull_request = github_repo.get_pulls( state='open', base=base, - head=branch)[1] + head=branch)[0] print("Updated pull request #%d (%s => %s)" % (pull_request.number, branch, base)) else: diff --git a/examples.md b/examples.md index 1afc1ad..ee47b24 100644 --- a/examples.md +++ b/examples.md @@ -41,7 +41,7 @@ jobs: ncu -u npm install - name: Create Pull Request - uses: peter-evans/create-pull-request@v1.7.0 + uses: peter-evans/create-pull-request@v1.7.1 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: update dependencies @@ -75,7 +75,7 @@ jobs: - run: echo "##[set-output name=pr_title;]update to latest Go release ${{ steps.ensure_go.outputs.go_version}}" id: pr_title_maker - name: Create pull request - uses: peter-evans/create-pull-request@v1.7.0 + uses: peter-evans/create-pull-request@v1.7.1 with: token: ${{ secrets.GITHUB_TOKEN }} title: ${{ steps.pr_title_maker.outputs.pr_title }} @@ -110,7 +110,7 @@ jobs: --domains quotes.toscrape.com \ http://quotes.toscrape.com/ - name: Create Pull Request - uses: peter-evans/create-pull-request@v1.7.0 + uses: peter-evans/create-pull-request@v1.7.1 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: update local website copy @@ -202,7 +202,7 @@ jobs: run: echo ::set-output name=branch-name::"autopep8-patches/$GITHUB_HEAD_REF" - name: Create Pull Request if: steps.autopep8.outputs.exit-code == 2 - uses: peter-evans/create-pull-request@v1.7.0 + uses: peter-evans/create-pull-request@v1.7.1 with: token: ${{ secrets.GITHUB_TOKEN }} commit-message: autopep8 action fixes @@ -249,7 +249,7 @@ The recommended method is to use [`set-output`](https://help.github.com/en/githu 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.7.0 + uses: peter-evans/create-pull-request@v1.7.1 with: token: ${{ secrets.GITHUB_TOKEN }} title: ${{ steps.vars.outputs.pr_title }} @@ -265,7 +265,7 @@ Alternatively, [`set-env`](https://help.github.com/en/github/automating-your-wor 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.7.0 + uses: peter-evans/create-pull-request@v1.7.1 with: token: ${{ secrets.GITHUB_TOKEN }} title: ${{ env.PULL_REQUEST_TITLE }} diff --git a/package.json b/package.json index f563f86..4904ebf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "create-pull-request", - "version": "1.7.0", + "version": "1.7.1", "description": "Creates a pull request for changes to your repository in the actions workspace", "main": "index.js", "scripts": { diff --git a/src/create-pull-request.py b/src/create-pull-request.py index 51676f8..1f56e5c 100755 --- a/src/create-pull-request.py +++ b/src/create-pull-request.py @@ -120,7 +120,7 @@ def process_event(github_token, github_repository, repo, branch, base): pull_request = github_repo.get_pulls( state='open', base=base, - head=branch)[1] + head=branch)[0] print("Updated pull request #%d (%s => %s)" % (pull_request.number, branch, base)) else: