From c12f3fafbcfaba13409aff030599664d2260691b Mon Sep 17 00:00:00 2001 From: Itay Podhajcer Date: Mon, 9 Oct 2023 11:19:05 +0300 Subject: [PATCH] Fixed dependabot ticket creation --- .github/workflows/dependabot-create-ticket.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dependabot-create-ticket.yml b/.github/workflows/dependabot-create-ticket.yml index 78b81c0..0053d21 100644 --- a/.github/workflows/dependabot-create-ticket.yml +++ b/.github/workflows/dependabot-create-ticket.yml @@ -69,12 +69,6 @@ jobs: run: gh pr edit ${{ env.PR_URL }} --title "${{ env.PR_TITLE }} (${{ steps.create_ticket.outputs.issue }})" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # Change Base to Staging - - name: Change Base to Staging - run: gh pr edit ${{ env.PR_URL }} --base staging - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - if: steps.dependabot-metadata.outputs.alert-state close-ticket: # Close Ticket @@ -92,13 +86,17 @@ jobs: # Read PR Title - name: Read PR Info run: echo "PR_TITLE=$(gh pr view --json title --jq .title ${{ env.PR_URL }})" >> $GITHUB_ENV + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Extract Ticket Number - name: Extract Ticket Number run: echo "TICKET_NUMBER=$(echo $PR_TITLE | grep -o 'VL-[0-9][0-9][0-9][0-9]')" >> $GITHUB_ENV + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Close Ticket - name: Close Ticket id: transition uses: atlassian/gajira-transition@v3 with: issue: ${{ env.TICKET_NUMBER }} - transition: "Closed" \ No newline at end of file + transition: "Closed"