mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-21 12:39:08 +01:00
f9fdc7f82f
GitOrigin-RevId: 25a14df75380e62a0b451e1f3c7d37f59a946fff
30 lines
1.2 KiB
Plaintext
30 lines
1.2 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.
|
|
sourceUrl = "https://github.com/10gen/mongo.git"
|
|
destinationUrl = "https://github.com/10gen/mongo-copybara.git"
|
|
|
|
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
|
|
origin_files = glob(["**"], exclude = ["src/mongo/db/modules/**"]),
|
|
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"),
|
|
],
|
|
)
|