Skip to content
Open
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
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 7 additions & 2 deletions issue_router/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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': '[email protected]',
'name': 'Max',
Expand Down Expand Up @@ -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}

Expand Down
3 changes: 3 additions & 0 deletions issue_router/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down