diff --git a/.github/workflows/update-dependencies.yml b/.github/workflows/update-dependencies.yml index 55d9a2af2..3ce14cff3 100644 --- a/.github/workflows/update-dependencies.yml +++ b/.github/workflows/update-dependencies.yml @@ -35,6 +35,6 @@ jobs: with: title: ${{ steps.run_dependency_updater.outputs.TITLE }} commit-message: ${{ steps.run_dependency_updater.outputs.TITLE }} - body: ${{ steps.run_dependency_updater.outputs.DESC }} + body: "${{ steps.run_dependency_updater.outputs.DESC }}" branch: run-dependency-updater delete-branch: true \ No newline at end of file diff --git a/dependency_updater/dependency_updater.go b/dependency_updater/dependency_updater.go index 34cfbf2ba..fe87c9dd6 100644 --- a/dependency_updater/dependency_updater.go +++ b/dependency_updater/dependency_updater.go @@ -141,12 +141,11 @@ func createCommitMessage(updatedDependencies []VersionUpdateInfo, repoPath strin commitDescription += repo + " => " + tag + " (" + dependency.DiffUrl + ") " repos = append(repos, repo) } - commitDescription = strings.TrimSuffix(commitDescription, "\n") + commitDescription = strings.TrimSuffix(commitDescription, " ") commitTitle += strings.Join(repos, ", ") if githubAction { - commitDescription = "\"" + commitDescription + "\"" - err := createGitMessageEnv(commitTitle, commitDescription, repoPath) + err := writeToGithubOutput(commitTitle, commitDescription, repoPath) if err != nil { return fmt.Errorf("error creating git commit message: %s", err) } @@ -340,7 +339,7 @@ func createVersionsEnv(repoPath string, dependencies Dependencies) error { return nil } -func createGitMessageEnv(title string, description string, repoPath string) error { +func writeToGithubOutput(title string, description string, repoPath string) error { file := os.Getenv("GITHUB_OUTPUT") f, err := os.OpenFile(file, os.O_APPEND|os.O_CREATE|os.O_WRONLY, 0644) if err != nil {