From d683f7dc1fcc1d9a2b17001dc03a753981c1c001 Mon Sep 17 00:00:00 2001 From: Sho Mizutani Date: Mon, 26 Apr 2021 22:21:37 +0900 Subject: [PATCH] url.QueryEscape for label as label name can contain a space --- src/auto_closer.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/auto_closer.go b/src/auto_closer.go index f9fa63f..952a9f1 100644 --- a/src/auto_closer.go +++ b/src/auto_closer.go @@ -6,6 +6,7 @@ import ( "fmt" "io/ioutil" "net/http" + "net/url" "os" "strconv" "strings" @@ -43,7 +44,7 @@ func newAutoCloser() (*autoCloser, error) { a.token = os.Getenv("GITHUB_TOKEN") a.repository = os.Getenv("GITHUB_REPOSITORY") a.label = os.Getenv("AC_LABEL") - a.endpoint = "https://api.github.com/repos/" + a.repository + "/issues?labels=" + a.label + a.endpoint = "https://api.github.com/repos/" + a.repository + "/issues?labels=" + url.QueryEscape(a.label) return a, nil }