From 9d1f77166022d3ddc0d553913a07217f3267b0f5 Mon Sep 17 00:00:00 2001 From: Shakar Bakr <5h4k4r.b4kr@gmail.com> Date: Sun, 15 Jun 2025 11:29:36 +0300 Subject: [PATCH] Enhance repository name extraction in action.yml to support multiple repositories, improving output clarity and functionality during execution. Signed-off-by: Shakar Bakr <5h4k4r.b4kr@gmail.com> --- action.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/action.yml b/action.yml index 8e40f68..bb7ee45 100644 --- a/action.yml +++ b/action.yml @@ -4,13 +4,15 @@ author: "Alastair Mooney" runs: using: "composite" steps: - - name: Extract repository name + - name: Extract repository names if: ${{ inputs.TARGET_REPO != '' && inputs.APP_ID != '' }} - id: extract-repo + id: extract-repos run: | - REPO_NAME=$(echo "${{ inputs.TARGET_REPO }}" | cut -d'/' -f2) - echo "repo-name=$REPO_NAME" - echo "repo-name=$REPO_NAME" >> $GITHUB_OUTPUT + SOURCE_REPO_NAME=$(echo "${{ inputs.REPO }}" | cut -d'/' -f2) + TARGET_REPO_NAME=$(echo "${{ inputs.TARGET_REPO }}" | cut -d'/' -f2) + echo "source-repo-name=$SOURCE_REPO_NAME" >> $GITHUB_OUTPUT + echo "target-repo-name=$TARGET_REPO_NAME" >> $GITHUB_OUTPUT + echo "repositories=$SOURCE_REPO_NAME,$TARGET_REPO_NAME" >> $GITHUB_OUTPUT shell: bash - name: Generate token for private repository access @@ -21,7 +23,7 @@ runs: app-id: ${{ inputs.APP_ID }} private-key: ${{ inputs.PRIVATE_KEY }} owner: ${{ inputs.OWNER }} - repositories: ${{ steps.extract-repo.outputs.repo-name }} + repositories: ${{ steps.extract-repos.outputs.repositories }} - name: Run TODO to Issue action uses: docker://reg.dev.krd/test-todo-to-issue/todo-to-issue-action:test