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 }}