Skip to content

Commit b7eef66

Browse files
authored
Merge pull request #11 from mongodb/copier-app-setup
feat: add files needed for copier app
2 parents 96b97ea + 838178e commit b7eef66

File tree

2 files changed

+329
-0
lines changed

2 files changed

+329
-0
lines changed

copier-config.yaml

Lines changed: 328 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,328 @@
1+
# MFlix Configuration with Batch PR Config
2+
# Source: mongodb/docs-sample-apps
3+
# This config uses batch_pr_config to create ONE PR per target repo with accurate file counts
4+
5+
source_repo: "mongodb/docs-sample-apps"
6+
source_branch: "main"
7+
8+
# Enable batching - all rules targeting the same repo will be combined into one PR
9+
batch_by_repo: true
10+
11+
# Configure PR metadata for batched PRs with accurate file counts
12+
batch_pr_config:
13+
pr_title: "Update MFlix application from docs-sample-apps"
14+
pr_body: |
15+
Automated update of MFlix application files
16+
17+
**Source Information:**
18+
- Repository: ${source_repo}
19+
- Branch: ${source_branch}
20+
- PR: #${pr_number}
21+
- Commit: ${commit_sha}
22+
23+
**Changes:**
24+
- Total files: ${file_count}
25+
- Target branch: ${target_branch}
26+
27+
This PR includes client files, server files, README, and .gitignore updates.
28+
All files have been automatically synchronized from the source repository.
29+
use_pr_template: true # Fetch and merge PR template from target repos
30+
commit_message: "Update MFlix from ${source_repo} PR #${pr_number} (${file_count} files)"
31+
32+
copy_rules:
33+
# ============================================================================
34+
# Java Target: mongodb/sample-app-java-mflix
35+
# ============================================================================
36+
37+
# Rule 1: Copy client directory to Java target
38+
- name: "mflix-client-to-java"
39+
source_pattern:
40+
type: "prefix"
41+
pattern: "mflix/client/"
42+
exclude_patterns:
43+
- "\\.gitignore$" # Exclude .gitignore files
44+
- "README.md$" # Exclude README files
45+
- "\\.env$" # Exclude environment files
46+
targets:
47+
- repo: "mongodb/sample-app-java-mflix"
48+
branch: "main"
49+
path_transform: "client/${relative_path}"
50+
commit_strategy:
51+
type: "pull_request"
52+
pr_title: "Update MFlix client from docs-sample-apps"
53+
pr_body: |
54+
Automated update of MFlix Next.js client
55+
56+
Source: ${source_repo}
57+
PR: #${pr_number}
58+
Commit: ${commit_sha}
59+
auto_merge: false
60+
deprecation_check:
61+
enabled: true
62+
file: "deprecated_examples.json"
63+
64+
# Rule 2: Copy Java server files (removing the java-spring subdirectory)
65+
- name: "java-server"
66+
source_pattern:
67+
type: "regex"
68+
pattern: "^mflix/server/java-spring/(?P<file>.+)$"
69+
exclude_patterns:
70+
- "\\.gitignore$" # Exclude .gitignore files
71+
- "README.md$" # Exclude README files
72+
- "\\.env$" # Exclude environment files
73+
targets:
74+
- repo: "mongodb/sample-app-java-mflix"
75+
branch: "main"
76+
path_transform: "server/${file}"
77+
commit_strategy:
78+
type: "pull_request"
79+
pr_title: "Update MFlix Java server from docs-sample-apps"
80+
pr_body: |
81+
Automated update of MFlix Java/Spring Boot server
82+
83+
Source: ${source_repo}
84+
PR: #${pr_number}
85+
Commit: ${commit_sha}
86+
auto_merge: false
87+
deprecation_check:
88+
enabled: true
89+
90+
# Rule 3: Copy Java README (renaming to just README.md)
91+
- name: "mflix-java-readme"
92+
source_pattern:
93+
type: "glob"
94+
pattern: "mflix/README-JAVA-SPRING.md"
95+
targets:
96+
- repo: "mongodb/sample-app-java-mflix"
97+
branch: "main"
98+
path_transform: "README.md"
99+
commit_strategy:
100+
type: "pull_request"
101+
pr_title: "Update README from docs-sample-apps"
102+
pr_body: |
103+
Automated update of README
104+
105+
Source: ${source_repo}
106+
PR: #${pr_number}
107+
auto_merge: false
108+
deprecation_check:
109+
enabled: true
110+
111+
# Rule 4: Copy Java .gitignore (renaming to just .gitignore)
112+
- name: "mflix-java-gitignore"
113+
source_pattern:
114+
type: "glob"
115+
pattern: "mflix/.gitignore-java"
116+
targets:
117+
- repo: "mongodb/sample-app-java-mflix"
118+
branch: "main"
119+
path_transform: ".gitignore"
120+
commit_strategy:
121+
type: "pull_request"
122+
pr_title: "Update .gitignore from docs-sample-apps"
123+
pr_body: |
124+
Automated update of .gitignore
125+
126+
Source: ${source_repo}
127+
PR: #${pr_number}
128+
auto_merge: false
129+
deprecation_check:
130+
enabled: true
131+
132+
# ============================================================================
133+
# JavaScript Target: mongodb/sample-app-nodejs-mflix
134+
# ============================================================================
135+
136+
# Rule 5: Copy client directory to JavaScript target
137+
- name: "mflix-client-to-js"
138+
source_pattern:
139+
type: "prefix"
140+
pattern: "mflix/client/"
141+
exclude_patterns:
142+
- "\\.gitignore$" # Exclude .gitignore files
143+
- "README.md$" # Exclude README files
144+
- "\\.env$" # Exclude environment files
145+
targets:
146+
- repo: "mongodb/sample-app-nodejs-mflix"
147+
branch: "main"
148+
path_transform: "client/${relative_path}"
149+
commit_strategy:
150+
type: "pull_request"
151+
pr_title: "Update MFlix client from docs-sample-apps"
152+
pr_body: |
153+
Automated update of MFlix Next.js client
154+
155+
Source: ${source_repo}
156+
PR: #${pr_number}
157+
Commit: ${commit_sha}
158+
auto_merge: false
159+
deprecation_check:
160+
enabled: true
161+
file: "deprecated_examples.json"
162+
163+
# Rule 6: Copy Express server files (removing the express subdirectory)
164+
- name: "mflix-express-server"
165+
source_pattern:
166+
type: "regex"
167+
pattern: "^mflix/server/js-express/(?P<file>.+)$"
168+
exclude_patterns:
169+
- "\\.gitignore$" # Exclude .gitignore files
170+
- "README.md$" # Exclude README files
171+
- "\\.env$" # Exclude environment files
172+
targets:
173+
- repo: "mongodb/sample-app-nodejs-mflix"
174+
branch: "main"
175+
path_transform: "server/${file}"
176+
commit_strategy:
177+
type: "pull_request"
178+
pr_title: "Update MFlix Express server from docs-sample-apps"
179+
pr_body: |
180+
Automated update of MFlix Express.js server
181+
182+
Source: ${source_repo}
183+
PR: #${pr_number}
184+
Commit: ${commit_sha}
185+
auto_merge: false
186+
deprecation_check:
187+
enabled: true
188+
189+
# Rule 7: Copy JavaScript README (renaming to just README.md)
190+
- name: "mflix-js-readme"
191+
source_pattern:
192+
type: "glob"
193+
pattern: "mflix/README-JAVASCRIPT-EXPRESS.md"
194+
targets:
195+
- repo: "mongodb/sample-app-nodejs-mflix"
196+
branch: "main"
197+
path_transform: "README.md"
198+
commit_strategy:
199+
type: "pull_request"
200+
pr_title: "Update README from docs-sample-apps"
201+
pr_body: |
202+
Automated update of README
203+
204+
Source: ${source_repo}
205+
PR: #${pr_number}
206+
auto_merge: false
207+
deprecation_check:
208+
enabled: true
209+
210+
# Rule 8: Copy JavaScript .gitignore (renaming to just .gitignore)
211+
- name: "mflix-js-gitignore"
212+
source_pattern:
213+
type: "glob"
214+
pattern: "mflix/.gitignore-js"
215+
targets:
216+
- repo: "mongodb/sample-app-nodejs-mflix"
217+
branch: "main"
218+
path_transform: ".gitignore"
219+
commit_strategy:
220+
type: "pull_request"
221+
pr_title: "Update .gitignore from docs-sample-apps"
222+
pr_body: |
223+
Automated update of .gitignore
224+
225+
Source: ${source_repo}
226+
PR: #${pr_number}
227+
auto_merge: false
228+
deprecation_check:
229+
enabled: true
230+
231+
# ============================================================================
232+
# Python Target: mongodb/sample-app-python-mflix
233+
# ============================================================================
234+
235+
# Rule 9: Copy client directory to Python target
236+
- name: "mflix-client-to-python"
237+
source_pattern:
238+
type: "prefix"
239+
pattern: "mflix/client/"
240+
exclude_patterns:
241+
- "\\.gitignore$" # Exclude .gitignore files
242+
- "README.md$" # Exclude README files
243+
- "\\.env$" # Exclude environment files
244+
targets:
245+
- repo: "mongodb/sample-app-python-mflix"
246+
branch: "main"
247+
path_transform: "client/${relative_path}"
248+
commit_strategy:
249+
type: "pull_request"
250+
pr_title: "Update MFlix client from docs-sample-apps"
251+
pr_body: |
252+
Automated update of MFlix Next.js client
253+
254+
Source: ${source_repo}
255+
PR: #${pr_number}
256+
Commit: ${commit_sha}
257+
auto_merge: false
258+
deprecation_check:
259+
enabled: true
260+
file: "deprecated_examples.json"
261+
262+
# Rule 10: Copy Python server files (removing the python subdirectory)
263+
- name: "mflix-python-server"
264+
source_pattern:
265+
type: "regex"
266+
pattern: "^mflix/server/python-fastapi/(?P<file>.+)$"
267+
exclude_patterns:
268+
- "\\.gitignore$" # Exclude .gitignore files
269+
- "README.md$" # Exclude README files
270+
- "\\.env$" # Exclude environment files
271+
targets:
272+
- repo: "mongodb/sample-app-python-mflix"
273+
branch: "main"
274+
path_transform: "server/${file}"
275+
commit_strategy:
276+
type: "pull_request"
277+
pr_title: "Update MFlix Python server from docs-sample-apps"
278+
pr_body: |
279+
Automated update of MFlix Python/FastAPI server
280+
281+
Source: ${source_repo}
282+
PR: #${pr_number}
283+
Commit: ${commit_sha}
284+
auto_merge: false
285+
deprecation_check:
286+
enabled: true
287+
288+
# Rule 11: Copy Python README (renaming to just README.md)
289+
- name: "mflix-python-readme"
290+
source_pattern:
291+
type: "glob"
292+
pattern: "mflix/README-PYTHON-FASTAPI.md"
293+
targets:
294+
- repo: "mongodb/sample-app-python-mflix"
295+
branch: "main"
296+
path_transform: "README.md"
297+
commit_strategy:
298+
type: "pull_request"
299+
pr_title: "Update README from docs-sample-apps"
300+
pr_body: |
301+
Automated update of README
302+
303+
Source: ${source_repo}
304+
PR: #${pr_number}
305+
auto_merge: false
306+
deprecation_check:
307+
enabled: true
308+
309+
# Rule 12: Copy Python .gitignore (renaming to just .gitignore)
310+
- name: "mflix-python-gitignore"
311+
source_pattern:
312+
type: "glob"
313+
pattern: "mflix/.gitignore-python"
314+
targets:
315+
- repo: "mongodb/sample-app-python-mflix"
316+
branch: "main"
317+
path_transform: ".gitignore"
318+
commit_strategy:
319+
type: "pull_request"
320+
pr_title: "Update .gitignore from docs-sample-apps"
321+
pr_body: |
322+
Automated update of .gitignore
323+
324+
Source: ${source_repo}
325+
PR: #${pr_number}
326+
auto_merge: false
327+
deprecation_check:
328+
enabled: true

deprecated_examples.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[]

0 commit comments

Comments
 (0)