Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion runway/extension/merger/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ load("@rules_go//go:def.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["merger.go"],
srcs = [
"commit_message.go",
"merger.go",
],
importpath = "github.com/uber/submitqueue/runway/extension/merger",
visibility = ["//visibility:public"],
deps = ["//api/runway/messagequeue:go_default_library"],
Expand Down
38 changes: 38 additions & 0 deletions runway/extension/merger/commit_message.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright (c) 2026 Uber Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package merger

//go:generate mockgen -source=commit_message.go -destination=mock/commit_message_mock.go -package=mock

import "context"

// CommitMessage is the message and authorship recorded on a squash or merge
// commit.
type CommitMessage struct {
// Message is the full commit message.
Message string
// AuthorName is the display name of the commit author.
AuthorName string
// AuthorEmail is the email address of the commit author.
AuthorEmail string
}

// CommitMessageResolver resolves the commit message and authorship for the
// change named by a change URI. Implementations must be safe for concurrent
// use.
type CommitMessageResolver interface {
// Resolve returns the commit message for the change identified by uri.
Resolve(ctx context.Context, uri string) (CommitMessage, error)
}
5 changes: 4 additions & 1 deletion runway/extension/merger/mock/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ load("@rules_go//go:def.bzl", "go_library")

go_library(
name = "go_default_library",
srcs = ["merger_mock.go"],
srcs = [
"commit_message_mock.go",
"merger_mock.go",
],
importpath = "github.com/uber/submitqueue/runway/extension/merger/mock",
visibility = ["//visibility:public"],
deps = [
Expand Down
57 changes: 57 additions & 0 deletions runway/extension/merger/mock/commit_message_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading