Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
0de079f
feat: initiate integrations
pablohashescobar Feb 7, 2023
e4a5a19
feat: initiate github integration create models for the same
pablohashescobar Feb 7, 2023
8726aeb
feat: github integration views
pablohashescobar Feb 7, 2023
3177abc
fix: update workspace integration view to create bot users
pablohashescobar Feb 7, 2023
20dc500
refactor: rename repository model
pablohashescobar Feb 8, 2023
b75f2ce
refactor: update github repo sync endpoint to create repo and sync in…
pablohashescobar Feb 8, 2023
31c0615
refactor: update issue activities to post the updates to segway hook
pablohashescobar Feb 8, 2023
3d845cc
refactor: update endpoints to get project id and add actor as a membe…
pablohashescobar Feb 8, 2023
10cd9a7
fix: make is bot as a read only field
pablohashescobar Feb 8, 2023
a4d590f
Merge branch 'develop' of https://github.com/makeplane/plane into fea…
venplane Feb 8, 2023
387b7eb
fix: remove github repo imports
pablohashescobar Feb 8, 2023
a776900
fix: url mapping
pablohashescobar Feb 8, 2023
da3e578
Merge branch 'feat/integrations' of https://github.com/makeplane/plan…
venplane Feb 8, 2023
ae67982
feat: repo views
pablohashescobar Feb 8, 2023
5e4245c
refactor: update webhook request endpoint
pablohashescobar Feb 8, 2023
3bb579d
Merge branch 'develop' of github.com:makeplane/plane into feat/integr…
pablohashescobar Feb 9, 2023
45194ef
refactor: rename repositories table to github_repositories
pablohashescobar Feb 9, 2023
82c4141
Merge branch 'develop' of https://github.com/makeplane/plane into fea…
venplane Feb 10, 2023
d6ad9a1
Merge branch 'feat/integrations' of https://github.com/makeplane/plan…
venplane Feb 10, 2023
f5b6f95
fix: workpace integration actor
pablohashescobar Feb 10, 2023
738d2f5
feat: label for github integration
pablohashescobar Feb 10, 2023
0e7204b
refactor: issue activity on create issue
pablohashescobar Feb 10, 2023
940bdf9
refactor: repo create endpoint and add db constraints for repo sync a…
pablohashescobar Feb 11, 2023
59d2f74
Merge branch 'develop' of github.com:makeplane/plane into feat/integr…
pablohashescobar Feb 11, 2023
6c94af6
feat: create api token on workpsace integration and avatar_url for in…
pablohashescobar Feb 11, 2023
39ef1a3
refactor: add uuid primary key for Audit model
pablohashescobar Feb 11, 2023
a2ab93c
refactor: remove id from auditfield to maintain integrity and make av…
pablohashescobar Feb 11, 2023
01d5da5
feat: track comments on an issue
pablohashescobar Feb 11, 2023
e61ea48
feat: comment syncing from plane to github
pablohashescobar Feb 12, 2023
e685175
fix: prevent activities created by bot to be sent to webhook
pablohashescobar Feb 12, 2023
1dc717e
feat: github app installation id retrieve
venplane Feb 13, 2023
e3f466b
Merge branch 'feat/integrations' of https://github.com/makeplane/plan…
venplane Feb 13, 2023
2adcb7e
feat: github app installation id saved into db
venplane Feb 13, 2023
1f8dbe6
feat: installation_id for the github integragation and unique provide…
pablohashescobar Feb 13, 2023
5cebce2
refactor: remove actor logic from activity task
pablohashescobar Feb 13, 2023
e285ad1
Merge branch 'feat/integrations' of github.com:makeplane/plane into f…
pablohashescobar Feb 13, 2023
f8a7c6c
Merge branch 'develop' of https://github.com/makeplane/plane into fea…
venplane Feb 14, 2023
0bf3e29
feat: saving github metadata using installation id in workspace integ…
venplane Feb 14, 2023
1498675
feat: github repositories endpoint
pablohashescobar Feb 15, 2023
e5959ff
Merge branch 'develop' of https://github.com/makeplane/plane into fea…
venplane Feb 15, 2023
106df74
feat: github and project repos synchronisation
venplane Feb 15, 2023
fc0b694
feat: delete issue and delete comment activity
pablohashescobar Feb 16, 2023
24cc52d
refactor: remove print logs
pablohashescobar Feb 16, 2023
84005c6
Merge branch 'develop' of https://github.com/makeplane/plane into fea…
venplane Feb 16, 2023
d848d5f
FIX: reading env names for github app while installation
venplane Feb 16, 2023
b8de838
refactor: update bot user firstname with title
pablohashescobar Feb 17, 2023
5298c16
Merge branch 'develop' of github.com:makeplane/plane into feat/integr…
pablohashescobar Feb 17, 2023
b5c80db
Merge branch 'develop' of github.com:makeplane/plane into feat/integr…
pablohashescobar Feb 21, 2023
0c8821c
Merge branch 'develop' of github.com:makeplane/plane into feat/integr…
pablohashescobar Feb 21, 2023
e38da24
Merge branch 'develop' of github.com:makeplane/plane into feat/integr…
pablohashescobar Feb 21, 2023
32aef5d
fix: add is_bot value in field
pablohashescobar Feb 22, 2023
250830a
Merge branch 'develop' of github.com:makeplane/plane into feat/integr…
pablohashescobar Feb 22, 2023
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
11 changes: 10 additions & 1 deletion apiserver/plane/api/serializers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,13 @@

from .module import ModuleWriteSerializer, ModuleSerializer, ModuleIssueSerializer

from .api_token import APITokenSerializer
from .api_token import APITokenSerializer

from .integration import (
IntegrationSerializer,
WorkspaceIntegrationSerializer,
GithubIssueSyncSerializer,
GithubRepositorySerializer,
GithubRepositorySyncSerializer,
GithubCommentSyncSerializer,
)
7 changes: 7 additions & 0 deletions apiserver/plane/api/serializers/integration/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from .base import IntegrationSerializer, WorkspaceIntegrationSerializer
from .github import (
GithubRepositorySerializer,
GithubRepositorySyncSerializer,
GithubIssueSyncSerializer,
GithubCommentSyncSerializer,
)
20 changes: 20 additions & 0 deletions apiserver/plane/api/serializers/integration/base.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Module imports
from plane.api.serializers import BaseSerializer
from plane.db.models import Integration, WorkspaceIntegration


class IntegrationSerializer(BaseSerializer):
class Meta:
model = Integration
fields = "__all__"
read_only_fields = [
"verified",
]


class WorkspaceIntegrationSerializer(BaseSerializer):
integration_detail = IntegrationSerializer(read_only=True, source="integration")

class Meta:
model = WorkspaceIntegration
fields = "__all__"
45 changes: 45 additions & 0 deletions apiserver/plane/api/serializers/integration/github.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
# Module imports
from plane.api.serializers import BaseSerializer
from plane.db.models import (
GithubIssueSync,
GithubRepository,
GithubRepositorySync,
GithubCommentSync,
)


class GithubRepositorySerializer(BaseSerializer):
class Meta:
model = GithubRepository
fields = "__all__"


class GithubRepositorySyncSerializer(BaseSerializer):
repo_detail = GithubRepositorySerializer(source="repository")

class Meta:
model = GithubRepositorySync
fields = "__all__"


class GithubIssueSyncSerializer(BaseSerializer):
class Meta:
model = GithubIssueSync
fields = "__all__"
read_only_fields = [
"project",
"workspace",
"repository_sync",
]


class GithubCommentSyncSerializer(BaseSerializer):
class Meta:
model = GithubCommentSync
fields = "__all__"
read_only_fields = [
"project",
"workspace",
"repository_sync",
"issue_sync",
]
3 changes: 3 additions & 0 deletions apiserver/plane/api/serializers/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class Meta:
"last_login_uagent",
"token_updated_at",
"is_onboarded",
"is_bot",
]
extra_kwargs = {"password": {"write_only": True}}

Expand All @@ -34,7 +35,9 @@ class Meta:
"last_name",
"email",
"avatar",
"is_bot",
]
read_only_fields = [
"id",
"is_bot",
]
123 changes: 121 additions & 2 deletions apiserver/plane/api/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@
# Api Tokens
ApiTokenEndpoint,
## End Api Tokens
# Integrations
IntegrationViewSet,
WorkspaceIntegrationViewSet,
GithubRepositoriesEndpoint,
GithubRepositorySyncViewSet,
GithubIssueSyncViewSet,
GithubCommentSyncViewSet,
## End Integrations
)


Expand Down Expand Up @@ -681,7 +689,118 @@
),
## End Modules
# API Tokens
path("api-tokens/", ApiTokenEndpoint.as_view(), name="api-token"),
path("api-tokens/<uuid:pk>/", ApiTokenEndpoint.as_view(), name="api-token"),
path("api-tokens/", ApiTokenEndpoint.as_view(), name="api-tokens"),
path("api-tokens/<uuid:pk>/", ApiTokenEndpoint.as_view(), name="api-tokens"),
## End API Tokens
# Integrations
path(
"integrations/",
IntegrationViewSet.as_view(
{
"get": "list",
"post": "create",
}
),
name="integrations",
),
path(
"integrations/<uuid:pk>/",
IntegrationViewSet.as_view(
{
"get": "retrieve",
"patch": "partial_update",
"delete": "destroy",
}
),
name="integrations",
),
path(
"workspaces/<str:slug>/workspace-integrations/",
WorkspaceIntegrationViewSet.as_view(
{
"get": "list",
}
),
name="workspace-integrations",
),
path(
"workspaces/<str:slug>/workspace-integrations/<str:provider>/",
WorkspaceIntegrationViewSet.as_view(
{
"post": "create",
}
),
name="workspace-integrations",
),
path(
"workspaces/<str:slug>/workspace-integrations/<uuid:pk>/",
WorkspaceIntegrationViewSet.as_view(
{
"get": "retrieve",
"delete": "destroy",
}
),
name="workspace-integrations",
),
# Github Integrations
path(
"workspaces/<str:slug>/workspace-integrations/<uuid:workspace_integration_id>/github-repositories/",
GithubRepositoriesEndpoint.as_view(),
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/workspace-integrations/<uuid:workspace_integration_id>/github-repository-sync/",
GithubRepositorySyncViewSet.as_view(
{
"get": "list",
"post": "create",
}
),
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/workspace-integrations/<uuid:workspace_integration_id>/github-repository-sync/<uuid:pk>/",
GithubRepositorySyncViewSet.as_view(
{
"get": "retrieve",
"delete": "destroy",
}
),
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/github-repository-sync/<uuid:repo_sync_id>/github-issue-sync/",
GithubIssueSyncViewSet.as_view(
{
"post": "create",
"get": "list",
}
),
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/github-repository-sync/<uuid:repo_sync_id>/github-issue-sync/<uuid:pk>/",
GithubIssueSyncViewSet.as_view(
{
"get": "retrieve",
"delete": "destroy",
}
),
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/github-repository-sync/<uuid:repo_sync_id>/github-issue-sync/<uuid:issue_sync_id>/github-comment-sync/",
GithubCommentSyncViewSet.as_view(
{
"post": "create",
"get": "list",
}
),
),
path(
"workspaces/<str:slug>/projects/<uuid:project_id>/github-repository-sync/<uuid:repo_sync_id>/github-issue-sync/<uuid:issue_sync_id>/github-comment-sync/<uuid:pk>/",
GithubCommentSyncViewSet.as_view(
{
"get": "retrieve",
"delete": "destroy",
}
),
),
## End Github Integrations
## End Integrations
]
11 changes: 10 additions & 1 deletion apiserver/plane/api/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,4 +72,13 @@

from .module import ModuleViewSet, ModuleIssueViewSet

from .api_token import ApiTokenEndpoint
from .api_token import ApiTokenEndpoint

from .integration import (
WorkspaceIntegrationViewSet,
IntegrationViewSet,
GithubIssueSyncViewSet,
GithubRepositorySyncViewSet,
GithubCommentSyncViewSet,
GithubRepositoriesEndpoint,
)
7 changes: 7 additions & 0 deletions apiserver/plane/api/views/integration/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
from .base import IntegrationViewSet, WorkspaceIntegrationViewSet
from .github import (
GithubRepositorySyncViewSet,
GithubIssueSyncViewSet,
GithubCommentSyncViewSet,
GithubRepositoriesEndpoint,
)
Loading