• P
    refactor sync script · c4894b3a
    popcor255 提交于
    As a developer, it is difficult to make changes to a script and ensure that nothing is broken without tests. Test are added in this patch with 80% code coverage. The script has also been refactored to increase readability. This refactor is not a pure refactor. The sync did not work properly. There is a list of bugs that reported the script generating broken links, #160, #126, #158, #133, #134. This refactor also includes a patch that fixes these bugs. The patch redirects a user to github if there is a relative link to a file that does not exist. This is important because some links will reference a snippet of code, test, or example. These artifacts are not docs, they are not rendered properly on the site. It is better to redirect the user to the intended artifact if the file is not synced. This prevents random 404s, and preserves the original behavior of the sync script. There are other approaches to fix this bug. This includes, manually editing links, downloading the files that the broken link are referencing in the sync config file, or removing the broken links. This is the best approach because broken links are automatically fixed and do not require manual intervention. This approach causes a side effect of not requiring the config file to be up-to date because the script will redirect the user to github. We want to encourage frequent sync. So eventually, this script should become tekton-ified (tekton task) and placed into the tekton catalog repo. Sync needs to become a tekon task in order for every repo to sync docs on push event.
    c4894b3a
runtime.txt 0 字节