Skip to content

Commit bb31968

Browse files
committed
Switch to pyproject, update README and release 0.0.3
1 parent 5ea4e8c commit bb31968

File tree

4 files changed

+70
-31
lines changed

4 files changed

+70
-31
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ __pycache__/
66
.pytest_cache
77
*.egg-info
88
auth.json
9+
dist/

README.md

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# gitlab-to-sqlite
22

3+
[![PyPI](https://img.shields.io/pypi/v/gitlab-to-sqlite.svg)](https://pypi.org/project/gitlab-to-sqlite/)
34
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/squiddy/gitlab-to-sqlite/blob/main/LICENSE)
45

56
Save data from GitLab to a SQLite database.
@@ -13,7 +14,11 @@ https://github.com/dogsheep/github-to-sqlite/.
1314
- [Authentication](#authentication)
1415
- [Using custom gitlab instance](#using-custom-gitlab-instance)
1516
- [Fetching projects](#fetching-projects)
17+
- [Fetching merge requests](#fetching-merge-requests)
1618
- [Fetching pipelines](#fetching-pipelines)
19+
- [Fetching environments](#fetching-environments)
20+
- [Fetching deployments](#fetching-deployments)
21+
- [Fetching commits](#fetching-commits)
1722

1823
## How to install
1924

@@ -47,6 +52,15 @@ The `projects` command retrieves a single project.
4752

4853
$ gitlab-to-sqlite projects gitlab.db group/project-name
4954

55+
## Fetching merge requests
56+
57+
The `merge-requests` command retrieves updated or created merge requests.
58+
59+
$ gitlab-to-sqlite merge-requests gitlab.db group/project-name
60+
61+
This command can be run regularly. Based on the most recent created or updated
62+
merge request it only fetches changes that happened afterwards.
63+
5064
## Fetching pipelines
5165

5266
The `pipelines` command retrieves updated or created pipelines with their
@@ -55,4 +69,26 @@ corresponding jobs.
5569
$ gitlab-to-sqlite pipelines gitlab.db group/project-name
5670

5771
This command can be run regularly. Based on the most recent created or updated
58-
pipeline it only fetches changes that happened afterwards.
72+
pipeline it only fetches changes that happened afterwards.
73+
74+
## Fetching environments
75+
76+
The `environments` command retrieves all environments of a single project.
77+
78+
$ gitlab-to-sqlite projects gitlab.db group/project-name
79+
80+
## Fetching deployments
81+
82+
The `deployments` command retrieves all deployments of a specific environment in
83+
a single project.
84+
85+
$ gitlab-to-sqlite deployments gitlab.db group/project-name environment-name
86+
87+
This command can be run regularly. Based on the most recent created or updated
88+
deployment it only fetches changes that happened afterwards.
89+
90+
## Fetching commits
91+
92+
The `commits` command retrieves all commits of a single project.
93+
94+
$ gitlab-to-sqlite commits gitlab.db group/project-name

pyproject.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
[project]
2+
name = "gitlab_to_sqlite"
3+
version = "0.0.3"
4+
description = "Save data from GitLab to a SQLite database"
5+
readme = "README.md"
6+
requires-python = ">=3.11"
7+
authors = [{name = "Reiner Gerecke"}]
8+
license = {text = "Apache-2.0"}
9+
classifiers = [
10+
"Development Status :: 3 - Alpha"
11+
]
12+
dependencies = [
13+
"sqlite-utils>=2.7.2",
14+
"gql[all]",
15+
"python-gitlab"
16+
]
17+
18+
[project.optional-dependencies]
19+
test = ["pytest", "black"]
20+
21+
[project.urls]
22+
Homepage = "https://github.com/squiddy/gitlab-to-sqlite"
23+
Issues = "https://github.com/squiddy/gitlab-to-sqlite/issues"
24+
25+
[project.scripts]
26+
gitlab-to-sqlite = "gitlab_to_sqlite.cli:cli"
27+
28+
[build-system]
29+
requires = ["setuptools"]
30+
build-backend = "setuptools.build_meta"
31+
32+

setup.py

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)