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

Add dependency check results to Jenkins REST API #107

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

profhenry
Copy link

Draft/sketch for adding dependency check findings to Jenkins REST API.

Please see https://issues.jenkins.io/browse/JENKINS-72062 for details.


@GET
@WebMethod(name = "findings")
public JsonHttpResponse getFindingsExposedInRemoteApi() {
Copy link
Member

Choose a reason for hiding this comment

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

I would not expose result unless a valid use case

@@ -135,4 +143,47 @@ public JSONObject getSeverityDistributionJson() {
return JSONObject.fromObject(getSeverityDistribution(), jsonConfig);
}

public Api getApi() {
return new Api(this);
Copy link
Member

Choose a reason for hiding this comment

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

in this case we have to return only severity distribution so you can return new Api(getSeverityDistribution()) without add all other methods (getSeverityDistribution trigger a lock) and keep the buildaction clean

@@ -135,4 +143,47 @@ public JSONObject getSeverityDistributionJson() {
return JSONObject.fromObject(getSeverityDistribution(), jsonConfig);
}

public Api getApi() {
Copy link
Member

Choose a reason for hiding this comment

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

Miss API documentation (_api.jelly in the parent object folder)

@nfalco79 nfalco79 force-pushed the master branch 3 times, most recently from 9631fc7 to dc2b961 Compare February 25, 2024 16:57
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.

2 participants