PR title and description inputs.
This commit is contained in:
@@ -26,6 +26,12 @@ user: read
|
|||||||
|
|
||||||
Tea CLI version (Default: 0.10.1)
|
Tea CLI version (Default: 0.10.1)
|
||||||
|
|
||||||
|
### pr-title
|
||||||
|
Custom title. Defaults to using subject of the most recent commit (`git log -n 1 --format=%s`).
|
||||||
|
|
||||||
|
### pr-description
|
||||||
|
Custom description. Defaults to using body of the most recent commit (`git log -n 1 --format=%b`).
|
||||||
|
|
||||||
### pr-label
|
### pr-label
|
||||||
|
|
||||||
Issues label for the PR
|
Issues label for the PR
|
||||||
|
|||||||
+15
-2
@@ -18,6 +18,12 @@ inputs:
|
|||||||
description: Tea CLI version
|
description: Tea CLI version
|
||||||
default: 0.10.1
|
default: 0.10.1
|
||||||
|
|
||||||
|
pr-title:
|
||||||
|
description: Custom title. Defaults to using subject of the most recent commit.
|
||||||
|
|
||||||
|
pr-description:
|
||||||
|
description: Custom description. Defaults to using body of the most recent commit.
|
||||||
|
|
||||||
pr-label:
|
pr-label:
|
||||||
description: Labels for the PR (comma-separated)
|
description: Labels for the PR (comma-separated)
|
||||||
|
|
||||||
@@ -78,9 +84,16 @@ runs:
|
|||||||
- name: PR Creation
|
- name: PR Creation
|
||||||
shell: bash
|
shell: bash
|
||||||
if: steps.check-opened-pr-step.outputs.exists == '0'
|
if: steps.check-opened-pr-step.outputs.exists == '0'
|
||||||
|
env:
|
||||||
|
PR_TITLE: ${{ inputs.pr-title }}
|
||||||
|
PR_DESCRIP: ${{ inputs.pr-description }}
|
||||||
run: |
|
run: |
|
||||||
PR_TITLE=$(git log -n 1 --format=%s)
|
if [ -z "${PR_TITLE}" ]; then
|
||||||
PR_DESCRIP=$(git log -n 1 --format=%b)
|
PR_TITLE=$(git log -n 1 --format=%s)
|
||||||
|
fi
|
||||||
|
if [ -z "${PR_DESCRIP}" ]; then
|
||||||
|
PR_DESCRIP=$(git log -n 1 --format=%b)
|
||||||
|
fi
|
||||||
tea pr c -r ${{ github.repository }} \
|
tea pr c -r ${{ github.repository }} \
|
||||||
-t "${PR_TITLE}" \
|
-t "${PR_TITLE}" \
|
||||||
-d "${PR_DESCRIP}" \
|
-d "${PR_DESCRIP}" \
|
||||||
|
|||||||
Reference in New Issue
Block a user