Closed vhemery closed 1 year ago
When using a branch with such a name (including brackets), Antora doesn't consider the branch. This may be a limitation or a bug in Antora. We are not going to investigate but instead validate the branch name to ensure it follows a pattern that works with Antora. Based on discussion with @benjaminParisel, we are going to allow the characters that are commonly used by Bonitasoft developers when naming their branches
.
/
-
_
To achieve this, we will add a step in the action building the site (PR preview and buid site for xref validation) This can be done with https://github.com/goshencollege/validate-branch-name or by using its implementation directly in js https://github.com/goshencollege/validate-branch-name/blob/v1.0.1/index.js
In addition, I have detected an issue in the "PR preview" action. The command use to build the preview doesn't escape the branch name by adding double quotes as this is done everywhere else. I will also add the double quote.
Run ./build-preview.bash --component bonita --branch docs(2022.2)-Update-release-note-for-7.15.2 --ignore-error true --fetch-sources true --pr "2309" --site-url "https://bonitasoft-bonita-doc-build_preview-pr-2309.surge.sh/" /home/runner/work/_temp/fd2729d7-a393-475e-8b6d-e3c65b527882.sh: line 1: syntax error near unexpected token `('
I will reopen the PR https://github.com/bonitasoft/bonita-doc/pull/2309 to test what is proposed here.
PR https://github.com/bonitasoft/bonita-doc/pull/2309 was opened on a branch named "docs(2022.2)-Update-release-note-for-7.15.2". Parentheses are not supported by the publication script. We also get errors such as
caused by the fact that the branch is not considered, as shows the warning
and the log listing versions
Easy workaround : just rename the branch and open a new PR.