Skip to content

Commit baced62

Browse files
authored
Merge pull request #88 from cetmix/feat-github-bitbucket_usage_examples
[DOC] Update README
2 parents 582d365 + 0d6cc2b commit baced62

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

README.rst

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,27 @@ Create a ``repos.yaml`` or ``repos.yml`` file:
4343
fetch_all:
4444
- oca
4545
46+
./gitlab-repo-example:
47+
remotes:
48+
gitlab_1: https://giltab.com/sample-org/sample-repo.git
49+
gitlab_2: https://giltab.com/another-sample-org/sample-repo-fork.git
50+
merges:
51+
- gitlab_1 main
52+
- gitlab_2 merge-requests/123/head
53+
target: gitlab_1
54+
55+
# FYI: Bitbucket doesn't support fetching PR's
56+
./bitbucket-repo-example:
57+
remotes:
58+
bitbucket_1: https://bitbucket.org/sample-org/sample-repo.git
59+
bitbucket_2: https://bitbucker.org/another-sample-org/sample-repo-fork.git
60+
merges:
61+
- bitbucket_1 main
62+
- bitbucket_2 dev
63+
target: bitbucket_1
64+
65+
66+
4667
Environment variables inside of this file will be expanded if the proper option is selected.
4768

4869
All the ``merges`` are combined into a single branch. By default this branch is called ``_git_aggregated`` but another name may be given in the ``target`` section.
@@ -107,6 +128,38 @@ the ``dict`` alternate construction. If you need to disable a default in
107128
ref: refs/pull/14859/head
108129
target: acsone 9.0
109130
131+
./gitlab-repo-example:
132+
defaults:
133+
depth: 20
134+
remotes:
135+
gitlab_1: https://giltab.com/sample-org/sample-repo.git
136+
gitlab_2: https://giltab.com/another-sample-org/sample-repo-fork.git
137+
merges:
138+
-
139+
remote: gitlab_1
140+
ref: main
141+
depth: 20
142+
-
143+
remote: gitlab_2
144+
ref: merge-requests/123/head
145+
target: gitlab_1
146+
147+
# FYI: Bitbucket doesn't support fetching PR's
148+
./bitbucket-repo-example:
149+
remotes:
150+
bitbucket_1: https://bitbucket.org/sample-org/sample-repo.git
151+
bitbucket_2: https://bitbucker.org/another-sample-org/sample-repo-fork.git
152+
merges:
153+
-
154+
remote: bitbucket_1
155+
ref: main
156+
depth: 3
157+
-
158+
remote: bitbucket_2
159+
ref: dev
160+
target: bitbucket_1
161+
162+
110163
Remember that you need to fetch at least the common ancestor of all merges for
111164
it to succeed.
112165

0 commit comments

Comments
 (0)