tf-a-lts-docs-watcher.yaml: Hide the new lts branch
For the lts branches, we only want tags to be visible
and hide the branches
Signed-off-by: Arthur She <arthur.she@linaro.org>
Change-Id: If9a4660533efe73c8c65b2742365cde5db2379ee
diff --git a/scripts/tf-a-lts-docs-watcher.sh b/scripts/tf-a-lts-docs-watcher.sh
index 45f93f5..26b9c78 100755
--- a/scripts/tf-a-lts-docs-watcher.sh
+++ b/scripts/tf-a-lts-docs-watcher.sh
@@ -37,10 +37,12 @@
build_trigger=$(curl -s -X POST -d "branches=${lts_branch}" -d "token=${RTD_WEBHOOK_SECRET_KEY}" ${RTD_WEBHOOK_URL} | jq .build_triggered)
if [ "${build_trigger}" = "false" ]; then
# The branch might be new and hasn't been known by RTD, or hasn't been activated, or both
- # we can trigger a build for the master branch to update all versions
- echo "The branch ${lts_branch} has not been activated! Activate it!"
+ # we can trigger a build for the master branch to update all branches
+ echo "The branch ${lts_branch} is now! Activate and hide it!"
curl -s -X POST -d "branches=master" -d "token=${RTD_WEBHOOK_SECRET_KEY}" ${RTD_WEBHOOK_URL}
activate_version ${lts_branch}
+ curl -s -X PATCH -H "Content-Type: application/json" -H "Authorization: Token ${RTD_API_TOKEN}" \
+ -d "{\"hidden\": true}" ${RTD_VER_API}/${lts_branch}/
fi
# Triggered by a new tag