Fix the way the repository is retrieved
This commit is contained in:
parent
62fd71c1b9
commit
df4813cb0f
7
main.go
7
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 == "" {
|
||||
|
|
Loading…
Reference in New Issue