From df4813cb0fdd6b782feb2a0a3b6872115d322f20 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Fri, 8 Mar 2024 12:19:33 +0100 Subject: [PATCH] Fix the way the repository is retrieved --- main.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/main.go b/main.go index 71f447b..750603e 100644 --- a/main.go +++ b/main.go @@ -17,11 +17,8 @@ func ParseActionConfig(ctx githubactions.GitHubContext) (*CreatePrConfig, error) return nil, errors.New("base branch name cannot be empty") } - rawRepo := strings.Split(githubactions.GetInput("GITHUB_REPOSITORY"), "/") - if len(rawRepo) != 2 { - return nil, fmt.Errorf("incorrect number of string from string: %v, %d", os.Getenv("GITHUB_REPOSITORY"), len(rawRepo)) - } - repo := rawRepo[1] + repo := ctx.Repository + fmt.Printf("The repository is %v\n", repo) title := githubactions.GetInput("title") if title == "" {