diff --git a/main.go b/main.go index 3cce7f0..71f447b 100644 --- a/main.go +++ b/main.go @@ -19,8 +19,9 @@ func ParseActionConfig(ctx githubactions.GitHubContext) (*CreatePrConfig, error) rawRepo := strings.Split(githubactions.GetInput("GITHUB_REPOSITORY"), "/") if len(rawRepo) != 2 { - return nil, fmt.Errorf("incorrect number of string from string: %v, %d", githubactions.GetInput("GITHUB_REPOSITORY"), len(rawRepo)) + return nil, fmt.Errorf("incorrect number of string from string: %v, %d", os.Getenv("GITHUB_REPOSITORY"), len(rawRepo)) } + repo := rawRepo[1] title := githubactions.GetInput("title") if title == "" { @@ -54,7 +55,7 @@ func ParseActionConfig(ctx githubactions.GitHubContext) (*CreatePrConfig, error) return &CreatePrConfig{ Org: ctx.RepositoryOwner, - Repo: rawRepo[1], + Repo: repo, HeadBranch: head, BaseBranch: base, Title: title,