This is an automated email from the ASF dual-hosted git repository.

lhotari pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


The following commit(s) were added to refs/heads/main by this push:
     new d9402d2938a3 Fix bugs in sample cherry-picking helper script
d9402d2938a3 is described below

commit d9402d2938a34bc60624a1c34aacd82252cb4254
Author: Lari Hotari <[email protected]>
AuthorDate: Wed Mar 6 01:24:29 2024 +0200

    Fix bugs in sample cherry-picking helper script
---
 contribute/release-process.md | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contribute/release-process.md b/contribute/release-process.md
index fc70646ca837..bbaed44dbac8 100644
--- a/contribute/release-process.md
+++ b/contribute/release-process.md
@@ -118,14 +118,15 @@ git fetch $UPSTREAM
 RELEASE_NUMBER=3.0.3
 RELEASE_BRANCH=branch-3.0
 PR_QUERY="is:merged label:release/$RELEASE_NUMBER 
-label:cherry-picked/$RELEASE_BRANCH"
-PR_NUMBERS=$(gh pr list --search "$PR_QUERY" --json number --jq 
'["#"+(.[].number|tostring)] | join("|")')
+PR_NUMBERS=$(gh pr list -L 100 --search "$PR_QUERY" --json number --jq 
'["#"+(.[].number|tostring)] | join("|")')
 ALREADY_PICKED=$(git log --oneline -P --grep="$PR_NUMBERS" --reverse 
$RELEASE_BRANCH | gawk 'match($0, /\(#([0-9]+)\)/, a) {print substr(a[0], 2, 
length(a[0])-2)}' | tr '\n' '|' | sed 's/|$//')
 if [[ -n "$ALREADY_PICKED" ]]; then
   echo "** Already picked but not tagged as cherry-picked **"
   git log --color --oneline -P --grep="$PR_NUMBERS" --reverse $RELEASE_BRANCH 
| gawk 'match($0, /\(#([0-9]+)\)/, a) {print $0 " 
https://github.com/apache/pulsar/pull/"; substr(a[0], 3, length(a[0])-3)}'
 fi
 echo "** Not cherry-picked from $UPSTREAM/master **"
-git log --color --oneline -P --grep="$PR_NUMBERS" --reverse $UPSTREAM/master | 
grep --color -v -E "$ALREADY_PICKED" | gawk 'match($0, /\(#([0-9]+)\)/, a) 
{print $0 " https://github.com/apache/pulsar/pull/"; substr(a[0], 3, 
length(a[0])-3)}'
+git log --color --oneline -P --grep="$PR_NUMBERS" --reverse $UPSTREAM/master | 
{ [ -n "$ALREADY_PICKED" ] && grep --color -v -E "$ALREADY_PICKED" || cat; } | 
gawk 'match($0, /\(#([0-9]+)\)/, a) {print $0 " 
https://github.com/apache/pulsar/pull/"; substr(a[0], 3, length(a[0])-3)}'
+echo "Check https://github.com/apache/pulsar/pulls?q=is:pr+$(echo "$PR_QUERY" 
| tr ' ' '+')"
 ```
 
 this produces an output such as:

Reply via email to