using gitea-list-pr action instead of re-inventing the wheel with curl...
This commit is contained in:
@@ -15,25 +15,19 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
- name: Verify URL
|
|
||||||
run: |
|
|
||||||
echo "Verifying URL: ${{ vars.RINOA_GITEA_API }}/repos/${{ github.repository }}/pulls"
|
|
||||||
- name: Check if Pull Request Exists
|
- name: Check if Pull Request Exists
|
||||||
id: check-pr
|
id: check-pr
|
||||||
uses: prasiman/gocurl@v1
|
uses: vicamo/gitea-list-pull-requests@v1
|
||||||
with:
|
with:
|
||||||
url: ${{ vars.RINOA_GITEA_API }}/repos/${{ github.repository }}/pulls
|
token: ${{ secrets.BOT_GITEA_TOKEN }}
|
||||||
params: '{ "state": "open" }'
|
server_url: $$ {{ vars.RINOA_GITEA_URL }}
|
||||||
method: "GET"
|
state: 'open'
|
||||||
headers: '{ "Authorization": "token ${{ secrets.GITEA_API_TOKEN }}" }'
|
|
||||||
log-response: true
|
|
||||||
- name: Parse Response
|
- name: Parse Response
|
||||||
id: parse-response
|
id: parse-response
|
||||||
uses: yakubique/json-utils@v1.8
|
uses: yakubique/json-utils@v1.8
|
||||||
with:
|
with:
|
||||||
input: ${{ steps.check-pr.response }}
|
input: "${{ steps.check-pr.outputs.json }}"
|
||||||
action: "get"
|
action: "none"
|
||||||
key: "data"
|
|
||||||
# - name: Create Pull Request
|
# - name: Create Pull Request
|
||||||
# if:
|
# if:
|
||||||
# uses: arifer612/Gitea-PR-action@v1.2.0
|
# uses: arifer612/Gitea-PR-action@v1.2.0
|
||||||
|
|||||||
Reference in New Issue
Block a user