Skip to content

Commit 412a0b0

Browse files
authored
Fix other repo issue. (#829)
Signed-off-by: ZePan110 <ze.pan@intel.com>
1 parent 96d5cd9 commit 412a0b0

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

.github/workflows/pr-path-detection.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,15 @@ jobs:
9494
run: |
9595
cd ${{github.workspace}}
9696
fail="FALSE"
97-
branch="https://github.com/opea-project/GenAIExamples/blob/${{ github.event.pull_request.head.ref }}"
97+
repo_name=${{ github.event.pull_request.head.repo.full_name }}
98+
if [ "$(echo "$repo_name"|cut -d'/' -f1)" != "opea-project" ]; then
99+
owner=$(echo "${{ github.event.pull_request.head.repo.full_name }}" |cut -d'/' -f1)
100+
branch="https://github.com/$owner/GenAIExamples/tree/${{ github.event.pull_request.head.ref }}"
101+
else
102+
branch="https://github.com/opea-project/GenAIExamples/blob/${{ github.event.pull_request.head.ref }}"
103+
fi
98104
link_head="https://github.com/opea-project/GenAIExamples/blob/main"
99-
png_lines=$(grep -Eo '\]\([^)]+\)' -r -I .|grep -Ev 'http')
105+
png_lines=$(grep -Eo '\]\([^)]+\)' --include='*.md' -r .|grep -Ev 'http')
100106
if [ -n "$png_lines" ]; then
101107
for png_line in $png_lines; do
102108
refer_path=$(echo "$png_line"|cut -d':' -f1 | cut -d'/' -f2-)

GenAIExamples

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Subproject commit de397d104153c2f5538a7d2eefa32b43b2918e43

0 commit comments

Comments
 (0)