Fix the way the environment variables are retrieved
This commit is contained in:
parent
deb1ba6843
commit
62fd71c1b9
5
main.go
5
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,
|
||||
|
|
Loading…
Reference in New Issue