diff --git a/README.md b/README.md index 3f8688b..a9dd7fa 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,15 @@ Route issues from Translator UI to Translator Services ## How to: POST to `/create_issue` with the following values: -- `url`: url where issue happened +- `title`: one line description of what happened +- `url`: NCATS UI url where the issue happened +- `arax_url`: ARAX UI url for the ars pk - `ars_pk`: pk given from ARS - `description`: a short summary of the issue - `reproduction_steps`: a list of steps one could do to reproduce the issue - `screenshots`: a list of base64 encoded images that show the issue - `type`: bug or feature request +- `submitter`: identification of the issue creator You will get back a response containing the following values: - `url`: the github url of the created issue diff --git a/issue_router/main.py b/issue_router/main.py index 27fb813..551ace6 100644 --- a/issue_router/main.py +++ b/issue_router/main.py @@ -11,7 +11,7 @@ app = FastAPI( title='Translator Issue Router', description='Post GitHub issues to Translator services.', - version='0.1.1', + version='0.1.2', contact={ 'email': 'max@covar.com', 'name': 'Max', @@ -57,12 +57,17 @@ async def create_issue(request: CreateIssueRequest): try: screenshots = upload_screenshots(request.screenshots) data = { - 'title': request.description, + 'title': {request.title}, 'body': f""" ## Type: {request.type} +## Submitter: {request.submitter} ## URL: {request.url} +## ARAX URL: {request.arax_url} ## ARS PK: {request.ars_pk} +## Description: +{request.description} + ## Steps to reproduce: {request.reproduction_steps} diff --git a/issue_router/models.py b/issue_router/models.py index 9721793..697674c 100644 --- a/issue_router/models.py +++ b/issue_router/models.py @@ -4,7 +4,10 @@ class CreateIssueRequest(BaseModel): """Schema for a /create_issue request.""" + title: str url: str + submitter: Optional[str] = "Anonymous" + arax_url: str ars_pk: str description: str reproduction_steps: str