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

Cannot generate report from Pull Request #159

Open
Sancretor opened this issue Jul 28, 2020 · 9 comments
Open

Cannot generate report from Pull Request #159

Sancretor opened this issue Jul 28, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@Sancretor
Copy link
Contributor

Expected behavior

The cnesreport should be able to generate a report from a Pull Request.

Actual behavior

On the plugin web page, a dropdown allows the user to select the branch on which the report should be based.
The branches (long-lived & short-lived) are available, but not the pull requests.

Steps to reproduce behavior

  • Analyze a project with SonarQube
  • Go to the plugin page on your SonarQube web interface
  • Select your project
  • Click on the branch dropdown to list all available branches

Detection version

3.2.2

@Sancretor Sancretor added bug Something isn't working enhancement New feature or request and removed bug Something isn't working labels Jul 28, 2020
@xabolcs
Copy link

xabolcs commented Sep 8, 2021

@Sancretor , why was this issue closed? Was this enhancement implemented?

It's a nice enhancement for those use cases where only the target branches and the pull requests are analyzed and the feature branches are skipped.

@Sancretor
Copy link
Contributor Author

Hi @xabolcs
I guess it was because nobody seemed interested and it was not that much useful for us too.
But if you're interested, I could reopen this issue.
Can't make any promise regarding when we'll be able to implement it though...

@xabolcs
Copy link

xabolcs commented Sep 10, 2021

But if you're interested, I could reopen this issue.

It would be nice to reopen. Thanks

Can't make any promise regarding when we'll be able to implement it though...

Fully understandable! 👌

At first sight, sed -i -e 's/branch=%s/%s=%s/' src/main/resources/requests.properties would be a good start for a quick and dirty hack! 🙈

@Sancretor Sancretor reopened this Sep 23, 2021
michaelsauter added a commit to opendevstack/ods-pipeline that referenced this issue Oct 12, 2021
* Do not generate reports when pull request exists for scanned branch.
For more information, see
opendevstack/ods-jenkins-shared-library#663
and cnescatlab/sonar-cnes-report#159.

* Ensure background task on server finishes before generating a
report. For more information, see
opendevstack/ods-jenkins-shared-library#732.

* Unify logging approach: instead of printing to STDOUT directly for
some messages, funnel everything through the logger instance. Other
tasks should adopt this as well.

Closes #227.
michaelsauter added a commit to opendevstack/ods-pipeline that referenced this issue Oct 12, 2021
* Do not generate reports when pull request exists for scanned branch.
For more information, see
opendevstack/ods-jenkins-shared-library#663
and cnescatlab/sonar-cnes-report#159.

* Ensure background task on server finishes before generating a
report. For more information, see
opendevstack/ods-jenkins-shared-library#732.

* Unify logging approach: instead of printing to STDOUT directly for
some messages, funnel everything through the logger instance. Other
tasks should adopt this as well.

Closes #227.
@renedupont
Copy link

@xabolcs I just tried replacing all occurrences of branch=%s with %s=%s like your first sight quick and dirty hack suggests but had no luck. Did you make any further progress with it?

@Sancretor
Copy link
Contributor Author

Hi @renedupont
Unfortunately, it won't be that simple, we'll have to modify both the web interface & the API calls to enable both branches and PRs.
I can't tell when we'll be able to work on this feature, as we already put a lot of effort to release the SQ 8.9 compatibility version.

@xabolcs
Copy link

xabolcs commented Oct 13, 2021

Hi @renedupont , that was my bet it wouldn't be so easy! 🙃

As @Sancretor wrote, you had to hack more ... 😕

I had no time for trying to solve this issue, sorry.

michaelsauter added a commit to opendevstack/ods-pipeline that referenced this issue Oct 14, 2021
* Do not generate reports when pull request exists for scanned branch.
For more information, see
opendevstack/ods-jenkins-shared-library#663
and cnescatlab/sonar-cnes-report#159.

* Ensure background task on server finishes before generating a
report. For more information, see
opendevstack/ods-jenkins-shared-library#732.

* Unify logging approach: instead of printing to STDOUT directly for
some messages, funnel everything through the logger instance. Other
tasks should adopt this as well.

Closes #227.
@renedupont
Copy link

All good, thanks for letting me know! In the meantime I'll skip generation for PRs!

michaelsauter added a commit to opendevstack/ods-pipeline that referenced this issue Oct 14, 2021
* Do not generate reports when pull request exists for scanned branch.
For more information, see
opendevstack/ods-jenkins-shared-library#663
and cnescatlab/sonar-cnes-report#159.

* Ensure background task on server finishes before generating a
report. For more information, see
opendevstack/ods-jenkins-shared-library#732.

* Unify logging approach: instead of printing to STDOUT directly for
some messages, funnel everything through the logger instance. Other
tasks should adopt this as well.

Closes #227.
@lobbin
Copy link

lobbin commented Feb 10, 2022

I'm also interested in this issue, but from the perspective of the command line tool.

@Sancretor
Copy link
Contributor Author

Hi @lobbin
When we will implement this feature (can't say when), it will obviously be on both standalone and plugin mode. ;)

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

No branches or pull requests

4 participants