Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add labels to the ticket creation #49

Merged
merged 2 commits into from
Apr 18, 2024
Merged
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
12 changes: 11 additions & 1 deletion docs/api.json
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,13 @@
"ticket_type": {
"type": "string",
"description": "Issue type of the ticket"
},
"labels": {
"type": "array",
"items": {
"type": "string",
"description": "Jira labels"
}
}
}
},
Expand Down Expand Up @@ -327,7 +334,10 @@
"summary": "Outdated Packages in Docker Image",
"description": "Long text with a detailed description of the ticket.",
"project": "PTVUL",
"ticket_type": "Vulnerability"
"ticket_type": "Vulnerability",
"labels": [
"potential"
]
}
},
"ticketResponseExample": {
Expand Down
11 changes: 8 additions & 3 deletions docs/api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ components:
ticket_type:
type: string
description: Issue type of the ticket
labels:
type: array
items:
type: string
description: Jira labels
ticketResponse:
allOf:
- type: object
Expand Down Expand Up @@ -190,9 +195,7 @@ components:
properties:
id:
type: string
description: >-
Identification of the relationship between a finding and a ticket
for a team in uuid format
description: Identification of the relationship between a finding and a ticket for a team in uuid format
finding_id:
type: string
description: Finding identification in uuid format
Expand All @@ -215,6 +218,8 @@ components:
description: Long text with a detailed description of the ticket.
project: PTVUL
ticket_type: Vulnerability
labels:
- potential
ticketResponseExample:
value:
id: 875abf8c-f9a2-473a-8623-5a85c85a3af9
Expand Down
2 changes: 1 addition & 1 deletion pkg/api/tracking_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ func TestCreateTicket(t *testing.T) {
}

req := httptest.NewRequest(http.MethodPost, "/", bytes.NewBuffer(qsStrData))
req.Header.Set(echo.HeaderContentType, echo.MIMEApplicationJSONCharsetUTF8)
req.Header.Set(echo.HeaderContentType, echo.MIMEApplicationJSON)
rec := httptest.NewRecorder()

c := e.NewContext(req, rec)
Expand Down