Skip to content

Commit

Permalink
Renamed 'message' to 'process' in zip creation code
Browse files Browse the repository at this point in the history
Renamed the variable 'message' to 'process' in the 'Execute' function of the 'archiveToFile' action in 'zip-create.go' to improve coherence. Updated corresponding references in the README documentation as well.
  • Loading branch information
PiotrFerenc committed Jun 1, 2024
1 parent 2dcabde commit 82295a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ or
**Inputs:**
- **path (text, required):** Path to the Git repository.
*Display Name:* Repository Path
- **message (text, required):** Message for the Git commit.
- **process (text, required):** Message for the Git commit.
*Display Name:* Commit Message
**Outputs:**
Expand Down
14 changes: 7 additions & 7 deletions cmd/worker/actions/zip/zip-create.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,17 +66,17 @@ func (action *archiveToFile) Outputs() []actions.Property {
// The resulting archive file path is set as a property in the message.
//
// Parameters:
// - message: The input Process message containing the file path and archive file name properties.
// - process: The input Process message containing the file path and archive file name properties.
//
// Returns:
// - types.Process: The modified Process message with the archive file path property set.
// - error: An error if any occurred during the execution.
func (action *archiveToFile) Execute(message types.Process) (types.Process, error) {
filePath, err := action.filePath.GetStringFrom(&message)
func (action *archiveToFile) Execute(process types.Process) (types.Process, error) {
filePath, err := action.filePath.GetStringFrom(&process)
if err != nil {
return types.Process{}, err
}
archiveFileName, err := action.archiveFileName.GetStringFrom(&message)
archiveFileName, err := action.archiveFileName.GetStringFrom(&process)
if err != nil {
return types.Process{}, err
}
Expand Down Expand Up @@ -121,9 +121,9 @@ func (action *archiveToFile) Execute(message types.Process) (types.Process, erro
return err
})
if err != nil {
return types.Process{}, err
return process, err
}

message.SetString(action.createdArchivePath.Name, archiveFullPath)
return message, nil
process.SetString(action.createdArchivePath.Name, archiveFullPath)
return process, nil
}

0 comments on commit 82295a1

Please sign in to comment.