You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/03/17 11:54:25 UTC
[GitHub] [apisix-website] bzp2010 opened a new pull request #263: feat: broken link checker script
bzp2010 opened a new pull request #263:
URL: https://github.com/apache/apisix-website/pull/263
Fixes: #255
Changes:
A broken link checking script is implemented using NodeJS. It can scan the link and initiate an HTTP request to check if the link is available.
Problem:
Currently, markdown link detection uses an external library, which will have problems in link identification when checking links without title. Then consider refactoring this part of the code.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#discussion_r598206171
##########
File path: link-checker.js
##########
@@ -0,0 +1,186 @@
+const fs = require("fs");
+const path = require("path");
+const childProcess = require("child_process");
+
+const projects = ["apisix-ingress-controller", "apisix", "apisix-dashboard"];
Review comment:
if we need to update some logics, we have to update two files? 🤔 it's ok for now, but I'm sure some contributors will miss this point.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 commented on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-803230175
> yes, could we redirect users to the original site? (apisix's GitHub I mean)
Redirect no `.md` files to GitHub page?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 commented on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-805760521
The generic code in the link check module has been splited.(such as document path generation)
The code in the document synchronization module will be implemented in the new PR.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 commented on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-802828050
#### Updated 2021-3-19
- add local markdown file checking function
#### Tips
- links starting with `http://` or `https://` and ending with `.md` are checked
#### Problem
Is there anything else to add?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] LiteSun merged pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
LiteSun merged pull request #263:
URL: https://github.com/apache/apisix-website/pull/263
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 commented on a change in pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on a change in pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#discussion_r600407823
##########
File path: link-checker.js
##########
@@ -0,0 +1,186 @@
+const fs = require("fs");
+const path = require("path");
+const childProcess = require("child_process");
+
+const projects = ["apisix-ingress-controller", "apisix", "apisix-dashboard"];
Review comment:
The generic code in the link check module has been splited.(such as document path generation)
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 commented on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-803233610
> `.lua` to github original file 🤔
I need to try. Due to problems other than documents that are not copied, the correct file location relationship may not be established.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 edited a comment on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-803233610
> `.lua` to github original file 🤔
I need to try. Due to the problem of not copying other files, the correct file location relationship may not be established.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 commented on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-803226396
Those `.lua` files were not copied to the document directory, which prevented it from being checked.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 commented on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-803495601
### Summary
- The target function has been realized. **(request review)**
- In order to ensure the correctness of the document, the link conversion function is not introduced in the workflow involving the output of compiled products. **(Do we need this?)**
- The current implementation is not elegant enough. **(Need help for improvement)**
**Thanks**
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 edited a comment on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-801837820
#### Updated 2021-3-18
- refactoring link scanner
- create workflow
#### Tips
- only links starting with `http://` or `https://` are checked
- relative paths and page anchors are not checked
- the list of broken links is stored by JSON in workflow artifacts
#### Problem
Is it necessary to check the existence of files linked by relative paths?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] juzhiyuan commented on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-801899583
Ya, I would prefer checking those links referenced across files.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] juzhiyuan commented on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-803227996
yes, could we redirect users to the original site? (apisix's GitHub I mean)
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 removed a comment on pull request #263: [WIP]feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 removed a comment on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-801824231
#### Updated 2021-3-18
- refactoring link scanner
- create workflow
#### Tips
- only links starting with `http://` or `https://` are checked
- relative paths and page anchors are not checked
#### Problem
Is it necessary to check the existence of files linked by relative paths?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 commented on a change in pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on a change in pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#discussion_r598206379
##########
File path: link-checker.js
##########
@@ -0,0 +1,186 @@
+const fs = require("fs");
+const path = require("path");
+const childProcess = require("child_process");
+
+const projects = ["apisix-ingress-controller", "apisix", "apisix-dashboard"];
Review comment:
Create a common file or import one script into another for reuse?🧐
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] juzhiyuan commented on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-803231601
`.lua` to github original file 🤔
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 commented on a change in pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on a change in pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#discussion_r598205722
##########
File path: link-checker.js
##########
@@ -0,0 +1,186 @@
+const fs = require("fs");
+const path = require("path");
+const childProcess = require("child_process");
+
+const projects = ["apisix-ingress-controller", "apisix", "apisix-dashboard"];
Review comment:
Here I use the same document pull code as the `sync-docs.js`.
The behavior of the two scripts in this part of the function is consistent, but because they are not in the same workflow, each script has these codes.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#discussion_r598205468
##########
File path: link-checker.js
##########
@@ -0,0 +1,186 @@
+const fs = require("fs");
+const path = require("path");
+const childProcess = require("child_process");
+
+const projects = ["apisix-ingress-controller", "apisix", "apisix-dashboard"];
Review comment:
I notice that we check projects here, so could we remove some logics from`sync-doc` script?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 commented on a change in pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on a change in pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#discussion_r598206379
##########
File path: link-checker.js
##########
@@ -0,0 +1,186 @@
+const fs = require("fs");
+const path = require("path");
+const childProcess = require("child_process");
+
+const projects = ["apisix-ingress-controller", "apisix", "apisix-dashboard"];
Review comment:
Create a common file or import one script into another for reuse?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 commented on a change in pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on a change in pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#discussion_r598206379
##########
File path: link-checker.js
##########
@@ -0,0 +1,186 @@
+const fs = require("fs");
+const path = require("path");
+const childProcess = require("child_process");
+
+const projects = ["apisix-ingress-controller", "apisix", "apisix-dashboard"];
Review comment:
Create a common file or import one script into another for reuse?🤔
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 edited a comment on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-801837820
#### Updated 2021-3-18
- refactoring link scanner
- create workflow
#### Tips
- only links starting with `http://` or `https://` are checked
- relative paths and page anchors are not checked
- **the list of broken links is stored by JSON in workflow artifacts**
#### Problem
Is it necessary to check the existence of files linked by relative paths?
> If necessary, the current PR has not been completed.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 edited a comment on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-803226396
Those `.lua` files were not copied to the document directory, which prevented it from being checked. Therefore, it will be regarded as a broken link.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 commented on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-801905393
OK, I will continue to work on it.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 edited a comment on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-801837820
#### Updated 2021-3-18
- refactoring link scanner
- create workflow
#### Tips
- only links starting with `http://` or `https://` are checked
- relative paths and page anchors are not checked
- **the list of broken links is stored by JSON in workflow artifacts**
#### Problem
Is it necessary to check the existence of files linked by relative paths?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 commented on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-803271048
#### Updated 2021-3-20
- add link conversion and check function for non document files
#### Tips
- non document files link will be converse to a web link on GitHub
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 commented on pull request #263: [WIP]feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-801837820
#### Updated 2021-3-18
- refactoring link scanner
- create workflow
#### Tips
- only links starting with `http://` or `https://` are checked
- relative paths and page anchors are not checked
#### Problem
Is it necessary to check the existence of files linked by relative paths?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] juzhiyuan commented on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-802919989
I noticed that there have some files end with `.lua` ?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#discussion_r598205468
##########
File path: link-checker.js
##########
@@ -0,0 +1,186 @@
+const fs = require("fs");
+const path = require("path");
+const childProcess = require("child_process");
+
+const projects = ["apisix-ingress-controller", "apisix", "apisix-dashboard"];
Review comment:
I notice that there have some logics repeated as `sync-doc.js`, could we take some function alongside?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 edited a comment on pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 edited a comment on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-805760521
The common code in the link-checker module has been splited. (such as document path generation)
The code in the document synchronization module will be implemented in the new PR.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] juzhiyuan commented on a change in pull request #263: feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on a change in pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#discussion_r598209631
##########
File path: link-checker.js
##########
@@ -0,0 +1,186 @@
+const fs = require("fs");
+const path = require("path");
+const childProcess = require("child_process");
+
+const projects = ["apisix-ingress-controller", "apisix", "apisix-dashboard"];
Review comment:
ya, I think so 🤔
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix-website] bzp2010 commented on pull request #263: [WIP]feat: broken link checker script
Posted by GitBox <gi...@apache.org>.
bzp2010 commented on pull request #263:
URL: https://github.com/apache/apisix-website/pull/263#issuecomment-801824231
#### Updated 2021-3-18
- refactoring link scanner
- create workflow
#### Tips
- only links starting with `http://` or `https://` are checked
- relative paths and page anchors are not checked
#### Problem
Is it necessary to check the existence of files linked by relative paths?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org