mongo/copy.bara.sky
Zack Winter af7f9d6c27 SERVER-117433 [v8.0] Add private third party dependency directory (#46744)
GitOrigin-RevId: 8ee73a5353fe561f1db819c649ab5cd9d914e42a
2026-03-19 23:15:32 +00:00

35 lines
1.3 KiB
Plaintext

# This configuration is for migrating code from one Git repository to another using Copybara.
# It selectively copies content, excluding specific paths and preserving authorship.
# To test locally
# sourceUrl = "/path/to/source"
# destinationUrl = "/path/to/dest"
sourceUrl = "https://github.com/10gen/mongo.git"
destinationUrl = "https://github.com/mongodb/mongo.git"
core.workflow(
name = "default",
origin = git.origin(
url = sourceUrl,
ref = "v8.0",
),
destination = git.destination(
url = destinationUrl,
fetch = "v8.0",
push = "v8.0",
),
# Change path to the folder you want to publish publicly
origin_files = glob(["**"], exclude = ["src/mongo/db/modules/**", "src/third_party/private/**"]),
authoring = authoring.pass_thru("MongoDB <mongodb@mongodb.com>"),
mode = "ITERATIVE",
# Change the path here to the folder you want to publish publicly
transformations = [
# (^.*?) - matches the first line (without the newline char)
# \n - matches the first newline (or nothing at all if there is no newline). If there is no match then nothing happens
# ((\n|.)*) - matches everything after
# Overall, this copies only the first line of the commit rather than the body
metadata.scrubber("(^.*?)\n((\n|.)*)", replacement = "$1"),
],
)