From e8e81a762717b02af463baee61bda04a7d80c0d2 Mon Sep 17 00:00:00 2001 From: Rachel Powers <508861+Ryex@users.noreply.github.com> Date: Fri, 14 Mar 2025 14:56:46 -0700 Subject: [PATCH] use `basename` and `dirname` to split `owner/repo` Co-authored-by: Seth Flynn Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> --- .github/actions/add-labels/action.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/actions/add-labels/action.yml b/.github/actions/add-labels/action.yml index 82b237497..0f36aff91 100644 --- a/.github/actions/add-labels/action.yml +++ b/.github/actions/add-labels/action.yml @@ -34,8 +34,8 @@ runs: COLORS: ${{ inputs.colors }} DEFAULT_COLOR: ${{ inputs.default-color }} run: | - owner=$(echo "$REPOSITORY" | cut -d '/' -f 1) - repo=$(echo "$REPOSITORY" | cut -d '/' -f 2) + owner="$(dirname "$REPOSITORY")" + repo="$(basename "$REPOSITORY")" query=$( jq -nr \ --arg labels "$LABELS" \ @@ -118,8 +118,8 @@ runs: REPOSITORY: ${{ inputs.repository }} ISSUES: ${{ inputs.issues }} run: | - owner=$(echo "$REPOSITORY" | cut -d '/' -f 1) - repo=$(echo "$REPOSITORY" | cut -d '/' -f 2) + owner="$(dirname "$REPOSITORY")" + repo="$(basename "$REPOSITORY")" query=$( jq -nr \ --arg issues "$ISSUES" \