From 9f1c1aa4f26e7ba3e614cc63c6cd6a2099f80d45 Mon Sep 17 00:00:00 2001 From: Christopher Date: Fri, 3 May 2024 14:34:56 -0500 Subject: [PATCH] chore: Update pull request number handling in readme and video-todo generators --- .github/workflows/readme-generator.yml | 4 +++- .github/workflows/video-todo-generator.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/readme-generator.yml b/.github/workflows/readme-generator.yml index bfd4f39c5..b23e60a57 100644 --- a/.github/workflows/readme-generator.yml +++ b/.github/workflows/readme-generator.yml @@ -37,7 +37,9 @@ jobs: with: github-token: ${{ secrets.PERSONAL_TOKEN }} script: | - const pullNumber = ${{ steps.create-pr.outputs.pull-request-number }} || null; + const output = steps.create-pr.outputs.pull-request-number; + const pullNumber = output ? parseInt(output) : null; + if (pullNumber) { github.rest.issues.addLabels({ issue_number: pullNumber, diff --git a/.github/workflows/video-todo-generator.yml b/.github/workflows/video-todo-generator.yml index f68d97d9e..3ab62ae4e 100644 --- a/.github/workflows/video-todo-generator.yml +++ b/.github/workflows/video-todo-generator.yml @@ -37,7 +37,9 @@ jobs: with: github-token: ${{ secrets.PERSONAL_TOKEN }} script: | - const pullNumber = ${{ steps.create-pr.outputs.pull-request-number }} || null; + const output = steps.create-pr.outputs.pull-request-number; + const pullNumber = output ? parseInt(output) : null; + if (pullNumber) { github.rest.issues.addLabels({ issue_number: pullNumber,