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>
This commit is contained in:
Shakar Bakr 2025-06-15 11:29:36 +03:00
parent 71182239cc
commit 9d1f771660
No known key found for this signature in database
GPG Key ID: DA55A26823AE3C28

View File

@ -4,13 +4,15 @@ author: "Alastair Mooney"
runs: runs:
using: "composite" using: "composite"
steps: steps:
- name: Extract repository name - name: Extract repository names
if: ${{ inputs.TARGET_REPO != '' && inputs.APP_ID != '' }} if: ${{ inputs.TARGET_REPO != '' && inputs.APP_ID != '' }}
id: extract-repo id: extract-repos
run: | run: |
REPO_NAME=$(echo "${{ inputs.TARGET_REPO }}" | cut -d'/' -f2) SOURCE_REPO_NAME=$(echo "${{ inputs.REPO }}" | cut -d'/' -f2)
echo "repo-name=$REPO_NAME" TARGET_REPO_NAME=$(echo "${{ inputs.TARGET_REPO }}" | cut -d'/' -f2)
echo "repo-name=$REPO_NAME" >> $GITHUB_OUTPUT 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 shell: bash
- name: Generate token for private repository access - name: Generate token for private repository access
@ -21,7 +23,7 @@ runs:
app-id: ${{ inputs.APP_ID }} app-id: ${{ inputs.APP_ID }}
private-key: ${{ inputs.PRIVATE_KEY }} private-key: ${{ inputs.PRIVATE_KEY }}
owner: ${{ inputs.OWNER }} owner: ${{ inputs.OWNER }}
repositories: ${{ steps.extract-repo.outputs.repo-name }} repositories: ${{ steps.extract-repos.outputs.repositories }}
- name: Run TODO to Issue action - name: Run TODO to Issue action
uses: docker://reg.dev.krd/test-todo-to-issue/todo-to-issue-action:test uses: docker://reg.dev.krd/test-todo-to-issue/todo-to-issue-action:test