-
Notifications
You must be signed in to change notification settings - Fork 0
/
copy.bara.sky
52 lines (50 loc) · 1.35 KB
/
copy.bara.sky
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
github_sot_url = "https://github.com/ob/cb-sot.git"
github_public_url = "https://github.com/ob/cb-sot-public.git"
core.workflow(
name = "export",
origin = git.origin(
url = github_sot_url,
ref = "master",
),
destination = git.destination(
url = github_public_url,
fetch = "master",
),
origin_files = glob(
["somedir/**"],
exclude = [
"somedir/bfile",
],
),
destination_files = glob(["**"]),
authoring = authoring.pass_thru("Default email <default@defatult.com>"),
transformations = [
core.move("somedir", ""),
],
)
core.workflow(
name = "import_pr",
mode = "CHANGE_REQUEST",
origin = git.github_pr_origin(
url = github_public_url,
branch = "master",
),
destination = git.destination(
url = github_sot_url,
fetch = "master",
),
origin_files = glob(["**"]),
destination_files = glob(
["somedir/**"],
exclude = [
"somedir/bfile",
],
),
authoring = authoring.pass_thru("Default email <default@defatult.com>"),
transformations = [
core.move("", "somedir"),
metadata.save_author(),
metadata.expose_label("COPYBARA_INTEGRATE_REVIEW"),
metadata.expose_label("GITHUB_PR_NUMBER", new_name = "Closes", separator = " #"),
],
)