test ella test #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Pylon Issue | |
on: | |
issues: | |
types: [opened] | |
pull_request: | |
types: [opened] | |
jobs: | |
create_pylon_issue: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v2 | |
- name: Create Pylon Issue for GitHub Issue | |
if: github.event_name == 'issues' | |
run: | | |
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 }}", | |
"body_html": "<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>GitHub Issue Details</title></head><body><h1>GitHub Issue Details</h1><p><strong>Description:</strong> ${{ github.event.issue.body }}</p><p><strong>Repository:</strong> ${{ github.repository }}</p><p><strong>Type:</strong> Github Issue</p><p><strong>URL:</strong> <a href="${{ github.event.issue.html_url }}">${{ github.event.issue.html_url }}</a></p></body></html>" | |
}' | |
- name: Create Pylon Issue for Pull Request | |
if: github.event_name == 'pull_request' | |
run: | | |
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 }}", | |
"body_html": "<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>GitHub Pull Request Details</title></head><body><h1>GitHub Pull Request Details</h1><p><strong>Description:</strong> ${{ github.event.pull_request.body }}</p><p><strong>Repository:</strong> ${{ github.repository }}</p><p><strong>Type:</strong> Pull Request</p><p><strong>URL:</strong> <a href="${{ github.event.pull_request.html_url }}">${{ github.event.pull_request.html_url }}</a></p></body></html>" | |
}' |