raulcd commented on code in PR #37870:
URL: https://github.com/apache/arrow/pull/37870#discussion_r1337123596


##########
ci/scripts/js_build.sh:
##########
@@ -32,12 +32,14 @@ yarn lint:ci
 yarn build
 
 if [ "${BUILD_DOCS_JS}" == "ON" ]; then
-  if [ "$(git config --get remote.origin.url)" == 
"https://github.com/apache/arrow.git"; ]; then
-    yarn doc
-  elif [ "$(git config --get remote.upstream.url)" == 
"https://github.com/apache/arrow.git"; ]; then
-    yarn doc --gitRemote upstream
-  elif [ "$(git config --get remote.apache.url)" == 
"[email protected]:apache/arrow.git" ]; then
+  # If apache or upstream are defined use those as remote.
+  # Otherwise use origin which could be a fork on PRs.
+  if [ "$(git config --get remote.apache.url)" == 
"[email protected]:apache/arrow.git" ]; then
     yarn doc --gitRemote apache
+  elif [[ "$(git config --get remote.upstream.url)" =~ 
"https://github.com/apache/arrow"; ]]; then

Review Comment:
   this will work with both `https://github.com/apache/arrow` and 
`https://github.com/apache/arrow.git`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to