From e83166e6868441b413a34fdf178d4eaea3c4b9d3 Mon Sep 17 00:00:00 2001 From: Or Avidov Date: Fri, 21 Jun 2024 10:31:35 +0300 Subject: [PATCH 1/2] Created create_pylon_issue.yml workflow --- .github/workflows/create_pylon_issue.yml | 42 ++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/create_pylon_issue.yml diff --git a/.github/workflows/create_pylon_issue.yml b/.github/workflows/create_pylon_issue.yml new file mode 100644 index 000000000..d7567f0f6 --- /dev/null +++ b/.github/workflows/create_pylon_issue.yml @@ -0,0 +1,42 @@ +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 -X POST "https://api.usepylon.com/v1/issues" \ + -H "Authorization: Bearer ${{ secrets.PYLON_API_KEY }}" \ + -H "Content-Type: application/json" \ + -d '{ + "title": "${{ github.event.issue.title }}", + "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 '{ + "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 }}" + }' From 893e5d58f39e6218eaed7dd5ac372cea477c29e2 Mon Sep 17 00:00:00 2001 From: oravi Date: Fri, 21 Jun 2024 10:37:45 +0300 Subject: [PATCH 2/2] cosmetics --- .github/workflows/create_pylon_issue.yml | 56 ++++++++++++------------ 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/.github/workflows/create_pylon_issue.yml b/.github/workflows/create_pylon_issue.yml index d7567f0f6..e62bc3023 100644 --- a/.github/workflows/create_pylon_issue.yml +++ b/.github/workflows/create_pylon_issue.yml @@ -10,33 +10,33 @@ jobs: create_pylon_issue: runs-on: ubuntu-latest steps: - - name: Check out the repository - uses: actions/checkout@v2 + - name: Check out the repository + uses: actions/checkout@v2 - - 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 '{ - "title": "${{ github.event.issue.title }}", - "description": "${{ github.event.issue.body }}", - "repository": "${{ github.repository }}", - "type": "GitHub Issue", - "url": "${{ github.event.issue.html_url }}" - }' + - 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 '{ + "title": "${{ github.event.issue.title }}", + "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 '{ - "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 }}" - }' + - 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 '{ + "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 }}" + }'