-
-
Notifications
You must be signed in to change notification settings - Fork 299
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: vulnerability findings API support #517
feat: vulnerability findings API support #517
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM one minor nit
import { BaseService, PaginatedRequestOptions, RequestHelper } from '../infrastructure'; | ||
|
||
export class VulnerabilityFindings extends BaseService { | ||
all(projectId: string | number, options?: PaginatedRequestOptions) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps add the types for the query options?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated with what I think you were after. I haven't done anything with Typescript before so this is all a bit new, let me know if that's not what you were thinking.
Having said that I'm a noob on TS I did wonder if making things like the severity
, confidence
and report_type
into enums would make sense here? I didn't see any enums anywhere in the project so wasn't sure if there was a reason to avoid them or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in ts, enum is as simple as saying 'undefined' | 'ignore'
etc :)
enums do exist in typescript: https://www.typescriptlang.org/docs/handbook/enums.html but in this case I think possible values are faster.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
otherwise LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice addition! I would suggest making the properties camelCase for consistency. Other than that LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’ll change to camelCase, that was a result of me being consistent with the gitlab API, my bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we got the library that takes care of the casing 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated with camelCase
I'm done messing with this one unless there are more items you'd like adjusted. |
LGTM, im just cleaning up the repo. Ill merge/ release soon! Thank you! |
Is that "cleaning up" why I see this showing up as |
Yup! See #483 for more info! I moved everything into a separate branch so i should be able to do things in parallel ;) |
🎉 This PR is included in version 14.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Adding support for fetching all findings: https://docs.gitlab.com/ee/api/vulnerability_findings.html#list-project-vulnerability-findings