2023-09-20 21:42:16 +02:00
|
|
|
# This configuration is for migrating code from one Git repository to another using Copybara.
|
|
|
|
# It selectively copies content, excluding specific paths and preserving authorship.
|
2024-09-16 17:20:10 +02:00
|
|
|
sourceUrl = "https://github.com/10gen/mongo.git"
|
|
|
|
destinationUrl = "https://github.com/10gen/mongo-copybara.git"
|
2023-09-20 21:42:16 +02:00
|
|
|
|
|
|
|
core.workflow(
|
|
|
|
name = "default",
|
|
|
|
origin = git.origin(
|
|
|
|
url = sourceUrl,
|
|
|
|
ref = "master",
|
|
|
|
),
|
|
|
|
destination = git.destination(
|
|
|
|
url = destinationUrl,
|
|
|
|
fetch = "master",
|
|
|
|
push = "master",
|
|
|
|
),
|
|
|
|
# Change path to the folder you want to publish publicly
|
2024-01-30 09:31:05 +01:00
|
|
|
origin_files = glob(["**"], exclude = ["src/mongo/db/modules/**"]),
|
2023-09-20 21:42:16 +02:00
|
|
|
authoring = authoring.pass_thru("MongoDB <mongodb@mongodb.com>"),
|
|
|
|
mode = "ITERATIVE",
|
|
|
|
# Change the path here to the folder you want to publish publicly
|
2024-09-16 17:20:10 +02:00
|
|
|
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"),
|
|
|
|
],
|
2023-09-20 21:42:16 +02:00
|
|
|
)
|