Skip to content

Commit 36a85fd

Browse files
committed
fix(workflow run): apply url.PathEscape when compiling URL
Signed-off-by: Babak K. Shandiz <babakks@github.com>
1 parent 3e9fbbb commit 36a85fd

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

pkg/cmd/workflow/run/run.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"fmt"
88
"io"
99
"net/http"
10+
"net/url"
1011
"reflect"
1112
"sort"
1213
"strings"
@@ -319,7 +320,7 @@ func runRun(opts *RunOptions) error {
319320
returnRunDetailsSupported = features.DispatchRunDetails
320321
}
321322

322-
path := fmt.Sprintf("repos/%s/actions/workflows/%d/dispatches", ghrepo.FullName(repo), workflow.ID)
323+
path := fmt.Sprintf("repos/%s/%s/actions/workflows/%d/dispatches", url.PathEscape(repo.RepoOwner()), url.PathEscape(repo.RepoName()), workflow.ID)
323324

324325
requestBody := map[string]interface{}{
325326
"ref": ref,

0 commit comments

Comments
 (0)