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

Added support for getting the report html for the current branch/pullrequest #274

Merged
merged 3 commits into from
Sep 10, 2020
Merged

Conversation

tobiasstadler
Copy link
Contributor

No description provided.

@Reamer
Copy link
Member

Reamer commented Sep 9, 2020

How do you know that these keys exist?
They are not documented.
sonar_measure_api

@tobiasstadler
Copy link
Contributor Author

I found the keys by inspecting the page, but maybe I should make use of isPullRequest in https://github.com/SonarSource/sonarqube/blob/master/server/sonar-web/src/main/js/helpers/branch-like.ts

@Reamer
Copy link
Member

Reamer commented Sep 9, 2020

Related to #260

@Reamer
Copy link
Member

Reamer commented Sep 10, 2020

Hi @tobiasstadler,
how did you solve the problem, that the Dependency Checking page is not displayed in the Branch (PullRequest) view?
I know that 'options.branchLike' is present in the request and I like your change to use the helper functions.
How do you know that the API endpoint 'api/measures/component' accepts the keys 'branch' or 'pullRequest'? As shown in my first answer, this is not documented.

@tobiasstadler
Copy link
Contributor Author

It is documented for SonarCloud: https://sonarcloud.io/web_api/api/measures and my 8.4.1 installation lists it if I check "Show Internal API"

@Reamer
Copy link
Member

Reamer commented Sep 10, 2020

Thanks for your help, your link and the hint to "Show internal API" was very helpful. Since this is an internal key, this should also be noted in your change.

@Reamer
Copy link
Member

Reamer commented Sep 10, 2020

Does this change display the dependency-check page in the Branch View? Unfortunately I can't test this, because I don't have a license.

@tobiasstadler
Copy link
Contributor Author

Does this change display the dependency-check page in the Branch View? Unfortunately I can't test this, because I don't have a license.

It displays the report for the selected branch/pull request instead of the one for the master branch

@tobiasstadler
Copy link
Contributor Author

Thanks for your help, your link and the hint to "Show internal API" was very helpful. Since this is an internal key, this should also be noted in your change.

How should this be documented? As comment in the code?

@Reamer
Copy link
Member

Reamer commented Sep 10, 2020

Thanks for your help, your link and the hint to "Show internal API" was very helpful. Since this is an internal key, this should also be noted in your change.

How should this be documented? As comment in the code?

Yes please, only a small note in the code.

@Reamer Reamer merged commit ec9eaae into dependency-check:master Sep 10, 2020
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.

None yet

2 participants