This commit is contained in:
2025-01-19 10:28:26 -05:00
parent 3b7d428f10
commit e9be8bcc4d
@@ -31,14 +31,13 @@ jobs:
continue-on-error: true
run: |
tea login add --name gitea-rinoa --url "${{ secrets.RINOA_GITEA_URL }}" --user gitea-sonarqube-bot --password "${{ secrets.BOT_GITEA_PASSWORD }}" --token ${{ secrets.BOT_GITEA_TOKEN }}
tea login default gitea-rinoa
pr_exists=$(tea pr list --repo ${{ github.repository }} --state open --fields index,title,head | egrep ${{ github.ref_name }} | tail -1 | wc -l)
echo ${pr_exists}
echo "exists=$pr_exists" >> $GITHUB_OUTPUT
- name: Create PR
if: ${{ steps.check-opened-pr-step.outputs.exists == '0' }}
run: |
tea login add --name gitea-rinoa --url "${{ secrets.RINOA_GITEA_URL }}" --user gitea-sonarqube-bot --password "${{ secrets.BOT_GITEA_PASSWORD }}" --token ${{ secrets.BOT_GITEA_TOKEN }}
tea login default gitea-rinoa
tea pr ls --repo ${{ github.repository }} --state all --fields index,title,head --output csv | egrep -v 'index' | head -1 | awk -F, '{print $1}'
pr_index_old=$(tea pr ls --repo ${{ github.repository }} --state all --fields index,title,head --output csv | egrep -v 'index' | head -1 | awk -F, '{print $1}' | sed -e 's|"||g')
pr_index_new=$(expr ${pr_index_old} + 1)