Skip to content

Commit 8027ed6

Browse files
authored
fix Gitlab pagination issue
1 parent 7c6b620 commit 8027ed6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/git-issue/import-export.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ Comment URL: $html_url" \
617617
done # For all comments on page
618618

619619
# Return if no more pages
620-
if ! grep -q '^Link:.*rel="next"' comments-header ; then
620+
if ! grep -q '^[Ll]ink:.*rel="next"' comments-header ; then
621621
break
622622
fi
623623

@@ -867,11 +867,11 @@ rest_next_page_url()
867867
:again
868868
# Print "next" link
869869
# This works only for the first element of the Link header
870-
s/^Link:.<\([^>]*\)>; rel="next".*/\1/p
870+
s/^[Ll]ink:.<\([^>]*\)>; rel="next".*/\1/p
871871
# If substitution worked branch to end of script
872872
t
873873
# Remove first element of the Link header and retry
874-
s/^Link: <[^>]*>; rel="[^"]*", */Link: /
874+
s/^[Ll]ink: <[^>]*>; rel="[^"]*", */[Ll]ink: /
875875
t again
876876
' "$1"-header
877877
}
@@ -910,7 +910,7 @@ sub_import()
910910
import_issues "$user" "$repo" "$provider"
911911

912912
# Return if no more pages
913-
if ! grep -q '^Link:.*rel="next"' issue-header ; then
913+
if ! grep -q '^[Ll]ink:.*rel="next"' issue-header ; then
914914
break
915915
fi
916916

0 commit comments

Comments
 (0)