Friday, May 3, 2024
HomePowershellAutomating SonarCloud with PowerShell – Half 3 Onboarding a Consumer – Jonathan...

Automating SonarCloud with PowerShell – Half 3 Onboarding a Consumer – Jonathan Medd’s Weblog


Warning: this submit incorporates unsupported API calls, so use at your individual threat

Just like the scenario in Half 2 for onboarding a mission into SonarCloud, onboarding a person into a company can be not supported through the general public API.

Within the API documentation there isn’t a entry for api/organizations

This was confirmed by a neighborhood posting and sadly didn’t seem on the roadmap:

Again to Chrome Developer Instruments

So in the identical method as in Half 2 I used Chrome Developer Instruments to observe what occurs within the SonarCloud UI when including a member to a company:

We are able to see {that a} URL of /api/organizations/add_member is used:

The payload contained two gadgets:

  • login – the GitLab person id
  • group – the SonarCloud group

Consequently the Add-SonarCloudOrganizationMember perform was born and we will now totally onboard a person to a company with the next:

The person is efficiently onboarded to the organisation:

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments