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: vulnerability findings API support #517

Merged
merged 3 commits into from
Dec 30, 2019

Conversation

arsdehnel
Copy link
Contributor

Copy link
Contributor

@jetersen jetersen left a 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) {
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

otherwise LGTM

Copy link
Owner

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

Copy link
Contributor Author

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.

Copy link
Contributor

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 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated with camelCase

@arsdehnel
Copy link
Contributor Author

I'm done messing with this one unless there are more items you'd like adjusted.

@jdalrymple
Copy link
Owner

LGTM, im just cleaning up the repo. Ill merge/ release soon! Thank you!

@arsdehnel
Copy link
Contributor Author

Is that "cleaning up" why I see this showing up as jdalrymple/gitbeaker now?

@jdalrymple
Copy link
Owner

Is that "cleaning up" why I see this showing up as jdalrymple/gitbeaker now?

Yup! See #483 for more info! I moved everything into a separate branch so i should be able to do things in parallel ;)

@jdalrymple jdalrymple merged commit 497bf94 into jdalrymple:master Dec 30, 2019
jdalrymple pushed a commit that referenced this pull request Dec 30, 2019
# [14.1.0](14.0.1...14.1.0) (2019-12-30)

### Bug Fixes

* make ResourceMembers.all/show delivery correct options params ([#521](#521)) ([505b407](505b407)), closes [#518](#518)

### Features

* Added support for the Vulnerability Findings API ([#517](#517)) ([497bf94](497bf94))
@jdalrymple
Copy link
Owner

🎉 This PR is included in version 14.1.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants