From 82295a1154218a1b3d95fe9a6c09eb8c2d913c7c Mon Sep 17 00:00:00 2001 From: Piotr Date: Sat, 1 Jun 2024 14:37:16 +0200 Subject: [PATCH] Renamed 'message' to 'process' in zip creation code 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. --- README.md | 2 +- cmd/worker/actions/zip/zip-create.go | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 89921c4..fc19b7c 100644 --- a/README.md +++ b/README.md @@ -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:** diff --git a/cmd/worker/actions/zip/zip-create.go b/cmd/worker/actions/zip/zip-create.go index 3ff1e7b..0b4650f 100644 --- a/cmd/worker/actions/zip/zip-create.go +++ b/cmd/worker/actions/zip/zip-create.go @@ -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 } @@ -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 }