clearcase/internal/setup/pullrequest_handler.go

19 lines
475 B
Go
Raw Normal View History

2025-03-06 22:47:02 +01:00
package setup
import (
"context"
"forge.cadoles.com/wpetit/clearcase/internal/config"
"forge.cadoles.com/wpetit/clearcase/internal/http/handler/webui/pullrequest"
"github.com/pkg/errors"
)
func NewPullRequestHandlerFromConfig(ctx context.Context, conf *config.Config) (*pullrequest.Handler, error) {
forgeManager, err := NewForgeManagerFromConfig(ctx, conf)
if err != nil {
return nil, errors.WithStack(err)
}
return pullrequest.NewHandler(forgeManager), nil
}