Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitLab Source: add GroupIssueBoards stream #13252

Merged
merged 6 commits into from
Jun 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@
- name: Gitlab
sourceDefinitionId: 5e6175e5-68e1-4c17-bff9-56103bbb0d80
dockerRepository: airbyte/source-gitlab
dockerImageTag: 0.1.5
dockerImageTag: 0.1.6
documentationUrl: https://docs.airbyte.io/integrations/sources/gitlab
icon: gitlab.svg
sourceType: api
Expand Down
2 changes: 1 addition & 1 deletion airbyte-integrations/connectors/source-gitlab/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ RUN pip install .

ENTRYPOINT ["python", "/airbyte/integration_code/main.py"]

LABEL io.airbyte.version=0.1.5
LABEL io.airbyte.version=0.1.6
LABEL io.airbyte.name=airbyte/source-gitlab
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ tests:
basic_read:
- config_path: "secrets/config.json"
configured_catalog_path: "integration_tests/configured_catalog.json"
empty_streams: ["group_issue_boards"]
# We cannot use these tests for testing Incremental, since for Gitlab the State is saved for each Project separately,
# and the Acceptance Tests at this stage do not support this functionality.
# Therefore, we hardcode the cursor_paths for our config.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,16 @@
"destination_sync_mode": "append",
"cursor_field": ["created_at"]
},
{
"stream": {
"name": "group_issue_boards",
"json_schema": {},
"supported_sync_modes": ["full_refresh"],
"source_defined_primary_key": [["id"]]
},
"sync_mode": "full_refresh",
"destination_sync_mode": "overwrite"
},
{
"stream": {
"name": "issues",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"type": "object",
"properties": {
"id": {
"type": ["null", "integer"]
},
"name": {
"type": ["null", "string"]
},
"hide_backlog_list": {
"type": ["null", "boolean"]
},
"hide_closed_list": {
"type": ["null", "boolean"]
},
"project": {
"type": ["null", "integer"]
},
"lists": {
"type": ["null", "array"],
"items": {
"type": ["null", "object"],
"properties": {
"id": {
"type": ["null", "integer"]
},
"label": {
"type": ["null", "object"],
"properties": {
"id": {
"type": ["null", "integer"]
},
"name": {
"type": ["null", "string"]
},
"description": {
"type": ["null", "string"]
},
"description_html": {
"type": ["null", "string"]
},
"text_color": {
"type": ["null", "string"]
},
"color": {
"type": ["null", "string"]
}
}
},
"position": {
"type": ["null", "integer"]
}
}
}
},
"group_id": {
"type": ["null", "integer"]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
EpicIssues,
Epics,
GitlabStream,
GroupIssueBoards,
GroupLabels,
GroupMembers,
GroupMilestones,
Expand Down Expand Up @@ -105,6 +106,7 @@ def streams(self, config: Mapping[str, Any]) -> List[Stream]:
Commits(parent_stream=projects, repository_part=True, start_date=config["start_date"], **auth_params),
epics,
EpicIssues(parent_stream=epics, **auth_params),
GroupIssueBoards(parent_stream=groups, **auth_params),
Issues(parent_stream=projects, start_date=config["start_date"], **auth_params),
Jobs(parent_stream=pipelines, **auth_params),
ProjectMilestones(parent_stream=projects, **auth_params),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,11 @@ def transform(self, record, stream_slice: Mapping[str, Any] = None, **kwargs):
return record


class GroupIssueBoards(GitlabChildStream):
path_template = "groups/{id}/boards"
flatten_parent_id = True


class Users(GitlabChildStream):
pass

Expand Down
1 change: 1 addition & 0 deletions docs/integrations/sources/gitlab.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ GitLab source is working with GitLab API v4. It can also work with self-hosted G

| Version | Date | Pull Request | Subject |
|:--------|:-----------|:---------------------------------------------------------| :--- |
| 0.1.6 | 2022-06-23 | [13252](https://github.com/airbytehq/airbyte/pull/13252) | Add GroupIssueBoards stream |
| 0.1.5 | 2022-05-02 | [11907](https://github.com/airbytehq/airbyte/pull/11907) | Fix null projects param and `container_expiration_policy` |
| 0.1.4 | 2022-03-23 | [11140](https://github.com/airbytehq/airbyte/pull/11140) | Ingest All Accessible Groups if not Specified in Config |
| 0.1.3 | 2021-12-21 | [8991](https://github.com/airbytehq/airbyte/pull/8991) | Update connector fields title/description |
Expand Down