From 5c8743b027c314e1a01349ef399a646319d7a442 Mon Sep 17 00:00:00 2001 From: EperezStemdo <166404865+EperezStemdo@users.noreply.github.com> Date: Wed, 1 May 2024 10:27:31 +0200 Subject: [PATCH] Update ejercicio3.yml --- .github/workflows/ejercicio3.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ejercicio3.yml b/.github/workflows/ejercicio3.yml index abf6de8f..64a52cc8 100644 --- a/.github/workflows/ejercicio3.yml +++ b/.github/workflows/ejercicio3.yml @@ -19,14 +19,17 @@ jobs: gh issue create --title "I found a bug" --body "${issue_body}" -a "EperezStemdo" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Get PR metadata - id: pr_meta - uses: fregante/pull-request-metadata@v2 + + - name: Extract issue number + id: extract_issue_number + run: | + pr_url="${{ github.event.pull_request.html_url }}" #url de la pr + issue_number=$(echo "$pr_url" | grep -oE '[0-9]+$') + echo "::set-output name=id::$issue_number" - name: AƱadir closes a la pr run: | - gh pr edit ${{ github.event.number }} --body "Close #${{ steps.issue.outputs.id }}" + gh pr edit ${{ github.event.number }} --body "Close #${{ steps.extract_issue_number.outputs.id }}" env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}