From dd74458a165d5af1442fc8c3cec194710f4fe0dd Mon Sep 17 00:00:00 2001 From: Or Avidov Date: Wed, 3 Jul 2024 13:06:15 +0300 Subject: [PATCH] Update create_pylon_issue.yml --- .github/workflows/create_pylon_issue.yml | 34 +++++++++++++----------- 1 file changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/create_pylon_issue.yml b/.github/workflows/create_pylon_issue.yml index e62bc3023..49bb985a6 100644 --- a/.github/workflows/create_pylon_issue.yml +++ b/.github/workflows/create_pylon_issue.yml @@ -16,27 +16,29 @@ jobs: - name: Create Pylon Issue for GitHub Issue if: github.event_name == 'issues' run: | - curl -X POST "https://api.usepylon.com/v1/issues" \ - -H "Authorization: Bearer ${{ secrets.PYLON_API_KEY }}" \ - -H "Content-Type: application/json" \ - -d '{ + curl --request POST \ + --url https://api.usepylon.com/issues \ + --header 'Authorization: ${{ secrets.PYLON_API_KEY }}' \ + --header 'Content-Type: application/json' \ + --data '{ + "account_id": "${{ secrets.PYLON_ACCOUNT_ID }}", + "requester_id": "${{ secrets.PYLON_REQUESTER_ID }}", + "priority": "medium", "title": "${{ github.event.issue.title }}", - "description": "${{ github.event.issue.body }}", - "repository": "${{ github.repository }}", - "type": "GitHub Issue", - "url": "${{ github.event.issue.html_url }}" + "body_html": "GitHub Issue Details

GitHub Issue Details

Description: ${{ github.event.issue.body }}

Repository: ${{ github.repository }}

Type: Github Issue

URL: ${{ github.event.issue.html_url }}

" }' - name: Create Pylon Issue for Pull Request if: github.event_name == 'pull_request' run: | - curl -X POST "https://api.usepylon.com/v1/issues" \ - -H "Authorization: Bearer ${{ secrets.PYLON_API_KEY }}" \ - -H "Content-Type: application/json" \ - -d '{ + curl --request POST \ + --url https://api.usepylon.com/issues \ + --header 'Authorization: ${{ secrets.PYLON_API_KEY }}' \ + --header 'Content-Type: application/json' \ + --data '{ + "account_id": "${{ secrets.PYLON_ACCOUNT_ID }}", + "requester_id": "${{ secrets.PYLON_REQUESTER_ID }}", + "priority": "medium", "title": "${{ github.event.pull_request.title }}", - "description": "${{ github.event.pull_request.body }}", - "repository": "${{ github.repository }}", - "type": "Pull Request", - "url": "${{ github.event.pull_request.html_url }}" + "body_html": "GitHub Pull Request Details

GitHub Pull Request Details

Description: ${{ github.event.pull_request.body }}

Repository: ${{ github.repository }}

Type: Pull Request

URL: ${{ github.event.pull_request.html_url }}

" }'