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

[action] add SonarQube pull request parameters to sonar #15069

Merged
merged 4 commits into from
Aug 13, 2019
Merged

[action] add SonarQube pull request parameters to sonar #15069

merged 4 commits into from
Aug 13, 2019

Conversation

damien-rivet
Copy link
Contributor

@damien-rivet damien-rivet commented Jul 23, 2019

Checklist

  • I've run bundle exec rspec from the root directory to see all new and existing tests pass
  • I've followed the fastlane code style and run bundle exec rubocop -a to ensure the code style is valid
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary.

Motivation and Context

This PR implements and closes #15068.

As explained in the linked issue, using the currently available parameters of the sonar action is limited in term of PR management from SonarQube.

This PR goal is to add the missing parameters that would allow for relevant code coverage comparison between branches.

Description

This PR add three new parameters to the sonar action.

Those parameters can be used to allow SonarQube to perform code coverage differentiation between the base branch and the targeted branch.

Signed-off-by: Damien Rivet <damien.rivet@gmail.com>
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here (e.g. I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@damien-rivet
Copy link
Contributor Author

I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@janpio janpio changed the title [#15068] Add SonarQube pull request parameters [action] Add SonarQube pull request parameters to sonar Jul 23, 2019
@janpio
Copy link
Member

janpio commented Jul 23, 2019

Awesome.

I know https://github.com/fastlane/fastlane/blob/master/fastlane/spec/actions_specs/sonar_spec.rb is pretty basic right now, but can you maybe add some tests for these new params?

@damien-rivet
Copy link
Contributor Author

@janpio I'll look into the test file to see what can be done, since it's my first contribution to the project I didn't notice the test file.

@janpio
Copy link
Member

janpio commented Jul 23, 2019

Yeah, as this is really barebones you'll probably have to look around a bit through the other test files to find something that tests the generated command of an external tool that is being triggered (hint: during tests sh doesn't actually execute the command, but just return the generated one so we can compare strings).

@damien-rivet
Copy link
Contributor Author

@janpio I've added a new unit test to check for the parameters (thanks slather).

I'm sorry but my current Ruby knowledge won't allow me to do better than that for the moment...

Signed-off-by: Damien Rivet <damien.rivet@gmail.com>
@damien-rivet
Copy link
Contributor Author

Hi @janpio,

I've fixed all the code issues (wow that was a lot of security checks, but worth it).

The PR should be cleared for review now ;-)

@janpio
Copy link
Member

janpio commented Jul 30, 2019

Ha yeah, our rules are pretty tight there - but makes it easier to not have to discuss the small things.

@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@joshdholtz joshdholtz changed the title [action] Add SonarQube pull request parameters to sonar [action] add SonarQube pull request parameters to sonar Aug 13, 2019
Copy link
Member

@joshdholtz joshdholtz left a comment

Choose a reason for hiding this comment

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

Looks good! I added a commit to remove the Fastlane.swift changes (those get automatically created when a new version of fastlane is released so no need to do it 😊). And thanks for this contribution! ❤️

@joshdholtz joshdholtz merged commit 774de1e into fastlane:master Aug 13, 2019
@damien-rivet
Copy link
Contributor Author

@joshdholtz thanks for the update :D I was worried I did something wrong and the whole PR would be declined.

@damien-rivet damien-rivet deleted the feature/15068-add-sonar-pull-request-parameters branch August 13, 2019 14:14
@fastlane-bot
Copy link

Hey @Ethenyl 👋

Thank you for your contribution to fastlane and congrats on getting this pull request merged 🎉
The code change now lives in the master branch, however it wasn't released to RubyGems yet.
We usually ship about once a week, and your PR will be included in the next one.

Please let us know if this change requires an immediate release by adding a comment here 👍
We'll notify you once we shipped a new release with your changes 🚀

@fastlane-bot
Copy link

Congratulations! 🎉 This was released as part of fastlane 2.129.0 🚀

@fastlane fastlane locked and limited conversation to collaborators Oct 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[sonar] Add Pull Request parameters
5 participants