You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: update_rollback.go
    path of file: ./repos/porter/api/server/handlers/release
    
    the code of the file until where you have to start completion: package release

import (
	"context"
	"fmt"
	"net/http"

	semver "github.com/Masterminds/semver/v3"
	"github.com/porter-dev/porter/api/server/authz"
	"github.com/porter-dev/porter/api/server/handlers"
	"github.com/porter-dev/porter/api/server/shared"
	"github.com/porter-dev/porter/api/server/shared/apierrors"
	"github.com/porter-dev/porter/api/server/shared/config"
	"github.com/porter-dev/porter/api/types"
	"github.com/porter-dev/porter/internal/models"
	"github.com/stefanmcshane/helm/pkg/release"
)

type RollbackReleaseHandler struct {
	handlers.PorterHandlerReadWriter
	authz.KubernetesAgentGetter
}

func NewRollbackReleaseHandler(
	config *config.Config,
	decoderValidator shared.RequestDecoderValidator,
	writer shared.ResultWriter,
) *RollbackReleaseHandler {
	return &RollbackReleaseHandler{
		PorterHandlerReadWriter: handlers.NewDefaultPorterHandler(config, decoderValidator, writer),
		KubernetesAgentGetter:   authz.NewOutOfClusterAgentGetter(config),
	}
}

func (c *RollbackReleaseHandler) ServeHTTP(w http.Respo
    
func UpdateReleaseRepo(config *config.Config, release *models.Release, helmRelease *release.Release) error {
	repository := helmRelease.Config["image"].(map[string]interface{})["repository"]
	repoStr, ok := repository.(string)

	if !ok {
		return fmt.Errorf("Could not find field repository in config")
	}

	if repoStr != release.ImageRepoURI &&
		repoStr != "public.ecr.aws/o1j4x7p4/hello-porter" &&
		repoStr != "public.ecr.aws/o1j4x7p4/hello-porter-job" {
		release.ImageRepoURI = repoStr
		_, err := config.Repo.Release().UpdateRelease(release)
		if err != nil {
			return err
		}

		// determine if the git action config is set, and propagate update to that as well
		if release.GitActionConfig != nil && release.GitActionConfig.ID != 0 {
			gitActionConfig, err := config.Repo.GitActionConfig().ReadGitActionConfig(release.GitActionConfig.ID)
			if err != nil {
				return err
			}

			gitActionConfig.ImageRepoURI = repoStr

			err = config.Repo.GitActionConfig().UpdateGitActionConfig(gitActionConfig)

			if err != nil {
				return err
			}
		}
	}

	return nil
}