FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Property to set project id so that multiple SonarQube projects can comment on the same pull request. by piotrwach · Pull Request #31 · SonarSource/sonar-github · GitHub

This repository was archived by the owner on Apr 2, 2019. It is now read-only.
/ sonar-github Public archive

Property to set project id so that multiple SonarQube projects can comment on the same pull request. - #31

Closed
piotrwach wants to merge 1 commit into
SonarSource:masterfrom
piotrwach:dev/flag-to-set-project-id
Closed

Property to set project id so that multiple SonarQube projects can comment on the same pull request.#31
piotrwach wants to merge 1 commit into
SonarSource:masterfrom
piotrwach:dev/flag-to-set-project-id

Conversation

Copy link
Copy Markdown

Example:

PR changes project A and project B, Jenkins runs sonar-scanner for A, github plugin posts comments on PR, then Jenkins runs sonar-scanner for B, github plugin deletes previous comments for project A, and replaces them with comments for project B.

My solution adds unique project id to each comment, so that only comments related to specific project get updated / deleted.

piotrwach force-pushed the dev/flag-to-set-project-id branch from 75cd8a3 to 59960f7 Compare March 23, 2017 16:14

ripla commented Mar 30, 2017

Copy link
Copy Markdown

We have this exact same issue, glad that someone already proposed a fix.

ripla commented May 29, 2017

Copy link
Copy Markdown

@henryju @piotrwach any chances of getting this in for the next version?

henryju commented May 29, 2017

Copy link
Copy Markdown
Member

To be honest I'm not really happy to "corrupt" comments to store a technical id. Another option would be to use a different technical account for each project, but that is also not ideal.

Copy link
Copy Markdown
Author

I think it is up to the users of this plugin to decide what they prefer - the id in the comment doesn't look that bad, we use my modified version that has it all the time.

I have considered having separate account per project, but this doesn't scale well.

henryju commented May 30, 2017

Copy link
Copy Markdown
Member

A colleague found a nice trick to hide the id: insert it as a reference at the bottom [project-id]: the_id. Then, instead of asking users to manually configure a project id, we could use the project key. That would solve all my concerns (bad rendering, extra configuration). WDTY?

piotrwach force-pushed the dev/flag-to-set-project-id branch from 59960f7 to a520c41 Compare May 31, 2017 07:57

ripla commented Jul 5, 2017

Copy link
Copy Markdown

@henryju good to go?

mszabo-wikia commented Oct 20, 2017
edited
Loading

Copy link
Copy Markdown

@henryju @teryk Is there a chance to get this merged? Having such feature would be very useful for monorepo style projects where multiple deployables live in a single repository - for such repositories, it is not feasible to create single SonarQube project, as the SonarQube projects should belong to and expose the metrics of the individual deployable component of the repository, and a huge single SonarQube project does not provide any useful or actionable information for monorepos.

If more work is needed, I can try to take this up. Do you have any extra requirements besides the format change and using project key instead of dedicated parameter?

ripla commented Nov 13, 2017

Copy link
Copy Markdown

@henryju reading up on the referenced issues and PR's, is the official line of SonarSource that monorepos are not supported, and never will be?

mszabo-wikia commented Nov 13, 2017
edited
Loading

Copy link
Copy Markdown

hey @henryju I've asked on the SONAR product forums and G. Ann Campbell, SONAR's Product Owner, has stated the plugin would not support monorepos. Here is the relevant thread.

Seems like forking is needed if monorepo support is desired :(

henryju commented Nov 13, 2017

Copy link
Copy Markdown
Member

@ripla Never say never ;) But indeed currently we don't plan to support that.

henryju closed this Nov 13, 2017

Copy link
Copy Markdown

I have built this plugin myself with my changes, and this is how we are using it. So everyone who needs this functionality I suggest to do the same. It takes just few minutes to do.

Copy link
Copy Markdown

Yeah, that's what we did as well.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL