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")
|
return nil, errors.New("base branch name cannot be empty")
|
||||||
}
|
}
|
||||||
|
|
||||||
rawRepo := strings.Split(githubactions.GetInput("GITHUB_REPOSITORY"), "/")
|
repo := ctx.Repository
|
||||||
if len(rawRepo) != 2 {
|
fmt.Printf("The repository is %v\n", repo)
|
||||||
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")
|
title := githubactions.GetInput("title")
|
||||||
if title == "" {
|
if title == "" {
|
||||||
|
|
Loading…
Reference in New Issue