Deprecate pr_number output
This commit is contained in:
parent
eb605db8a3
commit
ded05960f3
3 changed files with 5 additions and 3 deletions
|
@ -72,7 +72,7 @@ Note that in order to read the step output the action step must have an id.
|
||||||
- name: Check outputs
|
- name: Check outputs
|
||||||
run: |
|
run: |
|
||||||
echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}"
|
echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}"
|
||||||
echo "Pull Request Number - ${{ steps.cpr.outputs.pr_number }}"
|
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
### Checkout
|
### Checkout
|
||||||
|
@ -188,7 +188,7 @@ jobs:
|
||||||
- name: Check outputs
|
- name: Check outputs
|
||||||
run: |
|
run: |
|
||||||
echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}"
|
echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}"
|
||||||
echo "Pull Request Number - ${{ steps.cpr.outputs.pr_number }}"
|
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
|
||||||
```
|
```
|
||||||
|
|
||||||
This reference configuration will create pull requests that look like this:
|
This reference configuration will create pull requests that look like this:
|
||||||
|
|
|
@ -40,7 +40,7 @@ inputs:
|
||||||
branch-suffix:
|
branch-suffix:
|
||||||
description: 'The branch suffix type.'
|
description: 'The branch suffix type.'
|
||||||
outputs:
|
outputs:
|
||||||
pr_number:
|
pull-request-number:
|
||||||
description: 'The pull request number'
|
description: 'The pull request number'
|
||||||
runs:
|
runs:
|
||||||
using: 'node12'
|
using: 'node12'
|
||||||
|
|
|
@ -113,6 +113,8 @@ def create_or_update_pull_request(
|
||||||
|
|
||||||
# Set the output variables
|
# Set the output variables
|
||||||
os.system(f"echo ::set-env name=PULL_REQUEST_NUMBER::{pull_request.number}")
|
os.system(f"echo ::set-env name=PULL_REQUEST_NUMBER::{pull_request.number}")
|
||||||
|
os.system(f"echo ::set-output name=pull-request-number::{pull_request.number}")
|
||||||
|
# 'pr_number' is deprecated
|
||||||
os.system(f"echo ::set-output name=pr_number::{pull_request.number}")
|
os.system(f"echo ::set-output name=pr_number::{pull_request.number}")
|
||||||
|
|
||||||
# Set labels, assignees and milestone
|
# Set labels, assignees and milestone
|
||||||
|
|
Loading…
Reference in a new issue