Skip to content

Commit

Permalink
source-gitlab: Convert to airbyte-lib (#34203)
Browse files Browse the repository at this point in the history
Co-authored-by: Serhii Lazebnyi <53845333+lazebnyi@users.noreply.github.com>
  • Loading branch information
Joe Reuter and lazebnyi committed Jan 16, 2024
1 parent 500a107 commit a182869
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 11 deletions.
12 changes: 2 additions & 10 deletions airbyte-integrations/connectors/source-gitlab/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,7 @@
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#


import sys

from airbyte_cdk.entrypoint import launch
from source_gitlab import SourceGitlab
from source_gitlab.config_migrations import MigrateGroups, MigrateProjects
from source_gitlab.run import run

if __name__ == "__main__":
source = SourceGitlab()
MigrateGroups.migrate(sys.argv[1:], source)
MigrateProjects.migrate(sys.argv[1:], source)
launch(source, sys.argv[1:])
run()
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ data:
connectorSubtype: api
connectorType: source
definitionId: 5e6175e5-68e1-4c17-bff9-56103bbb0d80
dockerImageTag: 2.1.0
dockerImageTag: 2.1.1
dockerRepository: airbyte/source-gitlab
documentationUrl: https://docs.airbyte.com/integrations/sources/gitlab
githubIssueLabel: source-gitlab
Expand Down
5 changes: 5 additions & 0 deletions airbyte-integrations/connectors/source-gitlab/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@
TEST_REQUIREMENTS = ["requests-mock~=1.9.3", "pytest~=6.1", "requests_mock", "pytest-mock"]

setup(
entry_points={
"console_scripts": [
"source-gitlab=source_gitlab.run:run",
],
},
name="source_gitlab",
description="Source implementation for Gitlab.",
author="Airbyte",
Expand Down
17 changes: 17 additions & 0 deletions airbyte-integrations/connectors/source-gitlab/source_gitlab/run.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#
# Copyright (c) 2023 Airbyte, Inc., all rights reserved.
#


import sys

from airbyte_cdk.entrypoint import launch
from source_gitlab import SourceGitlab
from source_gitlab.config_migrations import MigrateGroups, MigrateProjects


def run():
source = SourceGitlab()
MigrateGroups.migrate(sys.argv[1:], source)
MigrateProjects.migrate(sys.argv[1:], source)
launch(source, sys.argv[1:])
1 change: 1 addition & 0 deletions docs/integrations/sources/gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ Gitlab has the [rate limits](https://docs.gitlab.com/ee/user/gitlab_com/index.ht

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:---------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| 2.1.1 | 2024-01-12 | [34203](https://github.com/airbytehq/airbyte/pull/34203) | prepare for airbyte-lib |
| 2.1.0 | 2023-12-20 | [33676](https://github.com/airbytehq/airbyte/pull/33676) | Add fields to Commits (extended_trailers), Groups (emails_enabled, service_access_tokens_expiration_enforced) and Projects (code_suggestions, model_registry_access_level) streams |
| 2.0.0 | 2023-10-23 | [31700](https://github.com/airbytehq/airbyte/pull/31700) | Add correct date-time format for Deployments, Projects and Groups Members streams |
| 1.8.4 | 2023-10-19 | [31599](https://github.com/airbytehq/airbyte/pull/31599) | Base image migration: remove Dockerfile and use the python-connector-base image |
Expand Down

0 comments on commit a182869

Please sign in to comment.