From 36a85fd71febf4c96c0b1729c6f51311dbc1e198 Mon Sep 17 00:00:00 2001 From: "Babak K. Shandiz" Date: Mon, 16 Feb 2026 21:55:25 +0000 Subject: [PATCH] fix(workflow run): apply `url.PathEscape` when compiling URL Signed-off-by: Babak K. Shandiz --- pkg/cmd/workflow/run/run.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkg/cmd/workflow/run/run.go b/pkg/cmd/workflow/run/run.go index 0484b3c06..294e403d4 100644 --- a/pkg/cmd/workflow/run/run.go +++ b/pkg/cmd/workflow/run/run.go @@ -7,6 +7,7 @@ import ( "fmt" "io" "net/http" + "net/url" "reflect" "sort" "strings" @@ -319,7 +320,7 @@ func runRun(opts *RunOptions) error { returnRunDetailsSupported = features.DispatchRunDetails } - path := fmt.Sprintf("repos/%s/actions/workflows/%d/dispatches", ghrepo.FullName(repo), workflow.ID) + path := fmt.Sprintf("repos/%s/%s/actions/workflows/%d/dispatches", url.PathEscape(repo.RepoOwner()), url.PathEscape(repo.RepoName()), workflow.ID) requestBody := map[string]interface{}{ "ref": ref,