-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: release changes for version 0.4.10
- Loading branch information
Showing
17 changed files
with
828 additions
and
106 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 15 additions & 7 deletions
22
galaxy/cli/cookiecutter/{{cookiecutter.integration_name}}/routes.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
from logging import Logger | ||
|
||
from fastapi import APIRouter, Depends | ||
|
||
from galaxy.core.magneto import Magneto | ||
from galaxy.core.mapper import Mapper | ||
from galaxy.core.utils import get_mapper, get_logger, get_magneto_client | ||
|
||
import logging | ||
|
||
router = APIRouter(prefix="/{{cookiecutter.integration_name}}", tags=["{{cookiecutter.integration_name}}"]) | ||
|
||
|
||
@router.post("/webhook") | ||
async def {{cookiecutter.integration_name}}_webhook( | ||
event: dict, | ||
mapper: Mapper = Depends(get_mapper), | ||
logger: logging = Depends(get_logger), | ||
logger: Logger = Depends(get_logger), | ||
magneto_client: Magneto = Depends(get_magneto_client), | ||
) -> dict: | ||
entity = await mapper.process("entities", [event]) | ||
logger.info(f"Received entity: {entity}") | ||
return {"message": "received gitlab webhook"} | ||
) -> None: | ||
try: | ||
entity, *_ = await mapper.process("entities", [event]) | ||
logger.info("Received entity: %s", entity) | ||
except Exception: | ||
... | ||
return | ||
|
||
try: | ||
await magneto_client.upsert_entity(entity) | ||
except Exception: | ||
... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[] |
Oops, something went wrong.