Skip to content

chore: add report bundle 1.0.33 (CORE-877) #436

chore: add report bundle 1.0.33 (CORE-877)

chore: add report bundle 1.0.33 (CORE-877) #436

name: Close Pylon Ticket on Issue or Pull Request Closure
on:
issues:
types: [closed]
pull_request_target:
types: [closed]
permissions: {}
jobs:
close_pylon_ticket:
runs-on: ubuntu-latest
permissions: {}
steps:
- name: Extract Pylon Ticket ID
id: extract_ticket_id
env:
EVENT_BODY: ${{ github.event_name == 'issues' && github.event.issue.body || github.event.pull_request.body }}
run: |
pylon_ticket_id=$(echo "$EVENT_BODY" | grep -oP '(?<=<!-- pylon-ticket-id: )\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b(?= -->)')
echo "pylon_ticket_id=$pylon_ticket_id" >> "$GITHUB_OUTPUT"
- name: Close Pylon Ticket
if: steps.extract_ticket_id.outputs.pylon_ticket_id != ''
env:
PYLON_TICKET_ID: ${{ steps.extract_ticket_id.outputs.pylon_ticket_id }}
PYLON_API_KEY: ${{ secrets.PYLON_API_KEY }}
run: |
echo "Closing Pylon Ticket ID: $PYLON_TICKET_ID"
curl --request PATCH \
--url "https://api.usepylon.com/issues/$PYLON_TICKET_ID" \
--header "Authorization: $PYLON_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"state": "closed"
}'