You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ur...@apache.org on 2022/09/28 07:13:39 UTC
[pulsar-site] branch fix-gh-token created (now 4f02db67377)
This is an automated email from the ASF dual-hosted git repository.
urfree pushed a change to branch fix-gh-token
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
at 4f02db67377 replace gh readonly token
This branch includes the following new commits:
new 4f02db67377 replace gh readonly token
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[pulsar-site] 01/01: replace gh readonly token
Posted by ur...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
urfree pushed a commit to branch fix-gh-token
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git
commit 4f02db67377549ef6821cb9285b7b0b067529ffd
Author: Li Li <ur...@apache.org>
AuthorDate: Wed Sep 28 15:13:28 2022 +0800
replace gh readonly token
Signed-off-by: Li Li <ur...@apache.org>
---
site2/tools/release-json-gen.sh | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/site2/tools/release-json-gen.sh b/site2/tools/release-json-gen.sh
index c4b256e71a0..63a61cf9b31 100755
--- a/site2/tools/release-json-gen.sh
+++ b/site2/tools/release-json-gen.sh
@@ -51,12 +51,12 @@ do
done
# gh auth login, ref: https://github.com/apache/pulsar-site/blob/760f7b47f437267a3c9d71d14c73e99ba32bd1ec/site2/website-next/scripts/release-notes.sh#L31-L33
-echo "$GH_TOKEN" > "$TOKEN_FILE"
+echo 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 > "$TOKEN_FILE"
gh auth login --with-token < "$TOKEN_FILE"
rm "$TOKEN_FILE"
# list all versions sorted by version number desc
-versions=$(gh release list | awk '{print $1}' | sort -rV)
+versions=$(gh release list -R apache/pulsar | awk '{print $1}' | sort -rV)
for v in $versions
do
if [[ $v != v* ]]; then # if the version doesn't start with v, add it
@@ -102,34 +102,34 @@ do
doc_ws=$doc/client-libraries-websocket
# Construct Pulsar JSON
- entry=$(gh release view "$v" --json author,tagName,publishedAt | jq "{author:.author.login,tagName,publishedAt,releaseNotes:\"$release_notes\",releaseBlog:\"$release_blog\",doc:\"$doc\"}")
+ entry=$(gh release view "$v" -R apache/pulsar --json author,tagName,publishedAt | jq "{author:.author.login,tagName,publishedAt,releaseNotes:\"$release_notes\",releaseBlog:\"$release_blog\",doc:\"$doc\"}")
echo "$entry," >> "$OUTPUT_PULSAR"
# Construct Client JSON
# Store the release notes body and lowercase it
- release_body=$(gh release view "$v" | tr '[:upper:]' '[:lower:]')
+ release_body=$(gh release view "$v" -R apache/pulsar | tr '[:upper:]' '[:lower:]')
# Java Client
if [[ $release_body == *"java"* ]]; then
- entry=$(gh release view "$v" --json tagName | jq "{tagName,releaseNotes:\"$release_notes_java\",doc:\"$doc_java\"}")
+ entry=$(gh release view "$v" -R apache/pulsar --json tagName | jq "{tagName,releaseNotes:\"$release_notes_java\",doc:\"$doc_java\"}")
echo "$entry," >> "$OUTPUT_JAVA"
fi
# Python Client
if [[ $release_body == *"python"* ]]; then
- entry=$(gh release view "$v" --json tagName | jq "{tagName,releaseNotes:\"$release_notes_python\",doc:\"$doc_python\"}")
+ entry=$(gh release view "$v" -R apache/pulsar --json tagName | jq "{tagName,releaseNotes:\"$release_notes_python\",doc:\"$doc_python\"}")
echo "$entry," >> "$OUTPUT_PYTHON"
fi
# C++ Client
if [[ $release_body == *"c++"* ]]; then
- entry=$(gh release view "$v" --json tagName | jq "{tagName,releaseNotes:\"$release_notes_cpp\",doc:\"$doc_cpp\"}")
+ entry=$(gh release view "$v" -R apache/pulsar --json tagName | jq "{tagName,releaseNotes:\"$release_notes_cpp\",doc:\"$doc_cpp\"}")
echo "$entry," >> "$OUTPUT_CPP"
fi
# Websocket Client
if [[ $release_body == *"websocket"* ]]; then
- entry=$(gh release view "$v" --json tagName | jq "{tagName,releaseNotes:\"$release_notes_ws\",doc:\"$doc_ws\"}")
+ entry=$(gh release view "$v" -R apache/pulsar --json tagName | jq "{tagName,releaseNotes:\"$release_notes_ws\",doc:\"$doc_ws\"}")
echo "$entry," >> "$OUTPUT_WS"
fi
done