File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 echo "🔍 Targeted isolation mode enabled. Processing items ONLY belonging to: $TARGET_REPOSITORY"
2929
3030 # Define the static Single-Select Option ID for RepoMark for this repository
31- # Change this ID if you run this script inside a different repository
3231 REPOMARK_OPTION_ID="0b0ebbc0"
3332 echo "📦 RepoMark Option ID assigned for this run: $REPOMARK_OPTION_ID"
3433
4140
4241 if [ "$CONTENT_TYPE" = "Issue" ] || [ "$CONTENT_TYPE" = "PullRequest" ]; then
4342
44- # 1. Extract repository path from the card URL
45- # Converts " https://github.com" -> " owner/repo-name"
46- EXTRACTED_REPO=$(echo "$URL" | sed -E 's|https://github.com([^/]+/[^/]+)/.*|\1|' )
43+ # 1. FIXED REPOSITORY PATH EXTRACTION
44+ # Strips ' https://github.com/' and cuts out the first two path segments ( owner/repo)
45+ EXTRACTED_REPO=$(echo "$URL" | sed 's|https://github.com/||' | cut -d'/' -f1,2 )
4746
4847 # 2. Strict validation filter
4948 # Compares the card's origin repository with the current running repository context
6059
6160 # 4. Dynamically build the correct GitHub API endpoint path based on item structural type
6261 if [ "$CONTENT_TYPE" = "PullRequest" ]; then
63- API_PATH=$(echo "$URL" | sed 's|https://github.com|repos/|' | sed 's|/pull/|/pulls/|')
62+ API_PATH=$(echo "$URL" | sed 's|https://github.com/ |repos/|' | sed 's|/pull/|/pulls/|')
6463 else
65- API_PATH=$(echo "$URL" | sed 's|https://github.com|repos/|')
64+ API_PATH=$(echo "$URL" | sed 's|https://github.com/ |repos/|')
6665 fi
6766
6867 # Fetch the true repository-level updated_at timestamp safely
You can’t perform that action at this time.
0 commit comments