Skip to content

Commit e8e81a7

Browse files
Ryexgetchoo
andauthored
use basename and dirname to split owner/repo
Co-authored-by: Seth Flynn <getchoo@tuta.io> Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
1 parent b42b453 commit e8e81a7

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/actions/add-labels/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ runs:
3434
COLORS: ${{ inputs.colors }}
3535
DEFAULT_COLOR: ${{ inputs.default-color }}
3636
run: |
37-
owner=$(echo "$REPOSITORY" | cut -d '/' -f 1)
38-
repo=$(echo "$REPOSITORY" | cut -d '/' -f 2)
37+
owner="$(dirname "$REPOSITORY")"
38+
repo="$(basename "$REPOSITORY")"
3939
query=$(
4040
jq -nr \
4141
--arg labels "$LABELS" \
@@ -118,8 +118,8 @@ runs:
118118
REPOSITORY: ${{ inputs.repository }}
119119
ISSUES: ${{ inputs.issues }}
120120
run: |
121-
owner=$(echo "$REPOSITORY" | cut -d '/' -f 1)
122-
repo=$(echo "$REPOSITORY" | cut -d '/' -f 2)
121+
owner="$(dirname "$REPOSITORY")"
122+
repo="$(basename "$REPOSITORY")"
123123
query=$(
124124
jq -nr \
125125
--arg issues "$ISSUES" \

0 commit comments

Comments
 (0)