This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar-test-infra.git
The following commit(s) were added to refs/heads/master by this push:
new c01009a Use url encoded branch name when searching
c01009a is described below
commit c01009ac7eea5e6deb005fecb870e032ef26f6dc
Author: Lari Hotari <[email protected]>
AuthorDate: Wed Oct 29 15:03:20 2025 +0200
Use url encoded branch name when searching
---
pulsarbot/entrypoint.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pulsarbot/entrypoint.sh b/pulsarbot/entrypoint.sh
index e733047..1fd4981 100755
--- a/pulsarbot/entrypoint.sh
+++ b/pulsarbot/entrypoint.sh
@@ -51,7 +51,7 @@ function github_client() {
# get head sha
PR_JSON="$(github_get "/pulls/${PR_NUM}")"
HEAD_SHA=$(printf "%s" "${PR_JSON}" | jq -r .head.sha)
-PR_BRANCH=$(printf "%s" "${PR_JSON}" | jq -r .head.ref)
+PR_BRANCH_URL_ENCODED=$(printf "%s" "${PR_JSON}" | jq -r '.head.ref | @uri')
PR_USER=$(printf "%s" "${PR_JSON}" | jq -r .head.user.login)
PR_HTML_URL=$(printf "%s" "${PR_JSON}" | jq -r .html_url)
@@ -60,7 +60,7 @@ echo "Handling pulsarbot command for PR #${PR_NUM}
${PR_HTML_URL}"
function get_runs() {
local page="${1:-1}"
# API reference
https://docs.github.com/en/rest/reference/actions#list-workflow-runs-for-a-repository
- github_get
"/actions/runs?actor=${PR_USER}&branch=${PR_BRANCH}&page=${page}&per_page=100" \
+ github_get
"/actions/runs?actor=${PR_USER}&branch=${PR_BRANCH_URL_ENCODED}&page=${page}&per_page=100"
\
| jq -r --arg head_sha "${HEAD_SHA}" \
'.workflow_runs[] | select(.head_sha==$head_sha) |
[.workflow_id,.created_at,.conclusion // .status,.url,.name,.html_url] | @csv' \
|| true