feat(chalice): jira fix
feat(chalice): jira upgrade feat(chalice): github fix
This commit is contained in:
parent
d9ce202a3d
commit
a7183590bc
9 changed files with 12 additions and 36 deletions
|
|
@ -4,7 +4,7 @@ boto3==1.24.26
|
|||
pyjwt==2.4.0
|
||||
psycopg2-binary==2.9.3
|
||||
elasticsearch==8.3.1
|
||||
jira==3.3.0
|
||||
jira==3.3.1
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ boto3==1.24.26
|
|||
pyjwt==2.4.0
|
||||
psycopg2-binary==2.9.3
|
||||
elasticsearch==8.3.1
|
||||
jira==3.3.0
|
||||
jira==3.3.1
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -443,27 +443,25 @@ def get_integration_status(context: schemas.CurrentContext = Depends(OR_context)
|
|||
|
||||
@app.post('/integrations/jira', tags=["integrations"])
|
||||
@app.put('/integrations/jira', tags=["integrations"])
|
||||
def add_edit_jira_cloud(data: schemas.JiraGithubSchema = Body(...),
|
||||
def add_edit_jira_cloud(data: schemas.JiraSchema = Body(...),
|
||||
context: schemas.CurrentContext = Depends(OR_context)):
|
||||
error, integration = integrations_manager.get_integration(tool=integration_jira_cloud.PROVIDER,
|
||||
tenant_id=context.tenant_id,
|
||||
user_id=context.user_id)
|
||||
if error is not None and integration is None:
|
||||
return error
|
||||
data.provider = integration_jira_cloud.PROVIDER
|
||||
return {"data": integration.add_edit(data=data.dict())}
|
||||
|
||||
|
||||
@app.post('/integrations/github', tags=["integrations"])
|
||||
@app.put('/integrations/github', tags=["integrations"])
|
||||
def add_edit_github(data: schemas.JiraGithubSchema = Body(...),
|
||||
def add_edit_github(data: schemas.GithubSchema = Body(...),
|
||||
context: schemas.CurrentContext = Depends(OR_context)):
|
||||
error, integration = integrations_manager.get_integration(tool=integration_github.PROVIDER,
|
||||
tenant_id=context.tenant_id,
|
||||
user_id=context.user_id)
|
||||
if error is not None:
|
||||
return error
|
||||
data.provider = integration_github.PROVIDER
|
||||
return {"data": integration.add_edit(data=data.dict())}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -87,18 +87,6 @@ def edit_slack_integration(integrationId: int, data: schemas.EditSlackSchema = B
|
|||
changes={"name": data.name, "endpoint": data.url})}
|
||||
|
||||
|
||||
# this endpoint supports both jira & github based on `provider` attribute
|
||||
@app.post('/integrations/issues', tags=["integrations"])
|
||||
def add_edit_jira_cloud_github(data: schemas.JiraGithubSchema,
|
||||
context: schemas.CurrentContext = Depends(OR_context)):
|
||||
provider = data.provider.upper()
|
||||
error, integration = integrations_manager.get_integration(tool=provider, tenant_id=context.tenant_id,
|
||||
user_id=context.user_id)
|
||||
if error is not None:
|
||||
return error
|
||||
return {"data": integration.add_edit(data=data.dict())}
|
||||
|
||||
|
||||
@app.post('/client/members', tags=["client"])
|
||||
@app.put('/client/members', tags=["client"])
|
||||
def add_member(background_tasks: BackgroundTasks, data: schemas.CreateMemberSchema = Body(...),
|
||||
|
|
|
|||
|
|
@ -100,10 +100,12 @@ class NotificationsViewSchema(BaseModel):
|
|||
endTimestamp: Optional[int] = Field(default=None)
|
||||
|
||||
|
||||
class JiraGithubSchema(BaseModel):
|
||||
provider: str = Field(...)
|
||||
username: str = Field(...)
|
||||
class GithubSchema(BaseModel):
|
||||
token: str = Field(...)
|
||||
|
||||
|
||||
class JiraSchema(GithubSchema):
|
||||
username: str = Field(...)
|
||||
url: HttpUrl = Field(...)
|
||||
|
||||
@validator('url')
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ boto3==1.24.26
|
|||
pyjwt==2.4.0
|
||||
psycopg2-binary==2.9.3
|
||||
elasticsearch==8.3.1
|
||||
jira==3.3.0
|
||||
jira==3.3.1
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ boto3==1.24.26
|
|||
pyjwt==2.4.0
|
||||
psycopg2-binary==2.9.3
|
||||
elasticsearch==8.3.1
|
||||
jira==3.3.0
|
||||
jira==3.3.1
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ boto3==1.24.26
|
|||
pyjwt==2.4.0
|
||||
psycopg2-binary==2.9.3
|
||||
elasticsearch==8.3.1
|
||||
jira==3.3.0
|
||||
jira==3.3.1
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -90,18 +90,6 @@ def edit_slack_integration(integrationId: int, data: schemas.EditSlackSchema = B
|
|||
changes={"name": data.name, "endpoint": data.url})}
|
||||
|
||||
|
||||
# this endpoint supports both jira & github based on `provider` attribute
|
||||
@app.post('/integrations/issues', tags=["integrations"])
|
||||
def add_edit_jira_cloud_github(data: schemas.JiraGithubSchema,
|
||||
context: schemas.CurrentContext = Depends(OR_context)):
|
||||
provider = data.provider.upper()
|
||||
error, integration = integrations_manager.get_integration(tool=provider, tenant_id=context.tenant_id,
|
||||
user_id=context.user_id)
|
||||
if error is not None:
|
||||
return error
|
||||
return {"data": integration.add_edit(data=data.dict())}
|
||||
|
||||
|
||||
@app.post('/client/members', tags=["client"])
|
||||
@app.put('/client/members', tags=["client"])
|
||||
def add_member(background_tasks: BackgroundTasks, data: schemas_ee.CreateMemberSchema = Body(...),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue