Updated create PR logic and added in Gitea List PR action.
This commit is contained in:
@@ -14,6 +14,12 @@ jobs:
|
|||||||
- name: Checkout Code
|
- name: Checkout Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: PR List (Action)
|
||||||
|
id: list-prs-action
|
||||||
|
uses: vicamo/gitea-list-pull-requests@v1.0.1
|
||||||
|
with:
|
||||||
|
state: open
|
||||||
|
|
||||||
- name: PR list
|
- name: PR list
|
||||||
id: list-prs
|
id: list-prs
|
||||||
run: |
|
run: |
|
||||||
@@ -22,10 +28,11 @@ jobs:
|
|||||||
-H 'Accept: application/json' \
|
-H 'Accept: application/json' \
|
||||||
-H 'Authorization: token ${{ secrets.BOT_GITEA_TOKEN }}' \
|
-H 'Authorization: token ${{ secrets.BOT_GITEA_TOKEN }}' \
|
||||||
-sS | jq '{index: .number, state: .state}')
|
-sS | jq '{index: .number, state: .state}')
|
||||||
|
echo "PR List: ${pr_check}"
|
||||||
pr_state=$(echo ${pr_check} | jq -r '.state')
|
pr_state=$(echo ${pr_check} | jq -r '.state')
|
||||||
|
|
||||||
- name: Create PR
|
- name: Create PR
|
||||||
if: steps.list-prs.outputs.pr_state != 'open'
|
if: steps.list-prs.outputs.pr_state = null
|
||||||
uses: arifer612/Gitea-PR-action@v1.2.0
|
uses: arifer612/Gitea-PR-action@v1.2.0
|
||||||
with:
|
with:
|
||||||
url: ${{ gitea.server_url }}
|
url: ${{ gitea.server_url }}
|
||||||
|
|||||||
Reference in New Issue
Block a user