From d37fb2ae726446b79cb142e4b86a8ef7942043f4 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Mon, 12 Aug 2019 10:20:53 +0300 Subject: move options to a config file --- examples/cgit-repos.conf | 24 ++++++++++++++++++++++++ examples/my_repos.py | 12 ++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 examples/cgit-repos.conf create mode 100644 examples/my_repos.py (limited to 'examples') diff --git a/examples/cgit-repos.conf b/examples/cgit-repos.conf new file mode 100644 index 0000000..9729fd3 --- /dev/null +++ b/examples/cgit-repos.conf @@ -0,0 +1,24 @@ +# All settings are optional. + +[DEFAULT] + +# /etc/cgit-repos/my_repos.py by default. +my_repos = /path/to/my_repos.py + +# "$( pwd )/output/" by default. +output = /path/to/output/ + +# URL to clone from the output directory. +# {repo_id} is substituted with the repository ID (in the NAME or SECTION/NAME +# format, etc.). +clone_url = http://example.com:8080/git/{repo_id} + +owner = Your Name + +[GITHUB] + +username = your-username + +[BITBUCKET] + +username = your-username diff --git a/examples/my_repos.py b/examples/my_repos.py new file mode 100644 index 0000000..2047b8d --- /dev/null +++ b/examples/my_repos.py @@ -0,0 +1,12 @@ +from pull.repo import BitbucketRepo, GithubRepo, Repo + + +MY_REPOS = ( + GithubRepo('xyz'), + GithubRepo('foo/bar', user='test', via_ssh=False), + + BitbucketRepo('xyz'), + BitbucketRepo('foo/bar', desc='Foo (Bar)'), + + Repo('tmp/tmp', clone_url='https://example.com/tmp.git', owner='John Doe'), +) -- cgit v1.2.3