Skip to content

Commit

Permalink
Fixed dependabot ticket creation
Browse files Browse the repository at this point in the history
  • Loading branch information
ItayPodhajcer authored Oct 9, 2023
1 parent 49c0dec commit c12f3fa
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/dependabot-create-ticket.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
transition: "Closed"

0 comments on commit c12f3fa

Please sign in to comment.