Troubleshooting create PR step.
This commit is contained in:
@@ -31,9 +31,10 @@ jobs:
|
|||||||
echo "Check if PR exists for ${{ github.ref_name }}"
|
echo "Check if PR exists for ${{ github.ref_name }}"
|
||||||
tea pr ls --repo ${{ github.repository }} --state all --fields index,title,head,state --output csv | egrep ${{ gitea.ref_name }} | awk -F, '{print $4}' | sed -e 's|"||g'
|
tea pr ls --repo ${{ github.repository }} --state all --fields index,title,head,state --output csv | egrep ${{ gitea.ref_name }} | awk -F, '{print $4}' | sed -e 's|"||g'
|
||||||
pr_state=$(tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state --output csv | egrep ${{ gitea.ref_name }} | awk -F, '{print $4}' | sed -e 's|"||g')
|
pr_state=$(tea pr ls --repo ${{ github.repository }} --state open --fields index,title,head,state --output csv | egrep ${{ gitea.ref_name }} | awk -F, '{print $4}' | sed -e 's|"||g')
|
||||||
if [ "${pr_state}" != open ]; then
|
echo "PR_STATE: ${pr_state}"
|
||||||
|
if [ ${pr_state} != open ]; then
|
||||||
tea pr c -r ${{ github.repository }} -t "Automated PR for ${{ github.ref_name }}" -d "Automated PR for ${{ github.ref_name }}"
|
tea pr c -r ${{ github.repository }} -t "Automated PR for ${{ github.ref_name }}" -d "Automated PR for ${{ github.ref_name }}"
|
||||||
elif [ "${pr_state}" = open ]; then
|
elif [ ${pr_state} = open ]; then
|
||||||
echo "PR already exists, skipping creation..."
|
echo "PR already exists, skipping creation..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user