Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

githubaction: Use correct config name for files #120

Merged
merged 1 commit into from
Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions internal/github/action.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ func NewActionEnv(getenv GetenvFn, version string) (*ActionEnv, error) {
return nil, err
}
repositoryParts := strings.SplitN(repository, "/", 2)
if len(repositoryParts) < 2 {
return nil, fmt.Errorf("GITHUB_REPOSITORY has invalid value %q", repository)
}

client := &Client{
Token: token,
Expand Down
12 changes: 8 additions & 4 deletions internal/githubaction/githubaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,9 @@ func (c Command) run() []error {
return []error{fmt.Errorf("GITHUB_SHA not set")}
}

files, _ := ae.Input("bump_files")
// support "bump_files" for backward compatibility
bumpFiles, _ := ae.Input("bump_files")
files, _ := ae.Input("files")
var bumpfile,
titleTemplate,
commitBodyTemplate,
Expand Down Expand Up @@ -159,8 +161,10 @@ func (c Command) run() []error {
}

// TODO: whitespace in filenames
filesParts := strings.Fields(files)
bfs, errs := bump.NewBumpFileSet(c.OS, all.Filters(), bumpfile, filesParts)
var filenames []string
filenames = append(filenames, strings.Fields(bumpFiles)...)
filenames = append(filenames, strings.Fields(files)...)
bfs, errs := bump.NewBumpFileSet(c.OS, all.Filters(), bumpfile, filenames)
if errs != nil {
return errs
}
Expand All @@ -185,7 +189,7 @@ func (c Command) run() []error {
continue
}

fmt.Printf(" Updateable to %s\n", check.Latest)
fmt.Printf(" Updatable to %s\n", check.Latest)

templateReplacerFn := CheckTemplateReplaceFn(check)

Expand Down
Loading