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

GetUserId by organization name and user name #11

Merged
merged 7 commits into from
Dec 1, 2020

Conversation

tapaszto
Copy link

@tapaszto tapaszto commented Nov 25, 2020

This is a feature upgrade utilizing the user entitlements DevOps API
The GeUserID function of the UserEntitlementsService returns the Azure DevOps user id by the organization name and user name, this functionality is required to be able to fix an Azure related bug of runatlantis/atlantis
New files:
userentitlements.go: contains the new functionality
examples/getuserid/main.go: an example of using the new functionality
Modified files:
azuredevops.go: UserEntitlementService is added

@Dilergore
Copy link

Hey @mcdafydd,

We are planning to fix the merge issue bug in Atlantis which for we need this as a prereq. Could you please review this so we can continue the work on the Atlantis side?

runatlantis/atlantis#1152

@mcdafydd
Copy link
Owner

mcdafydd commented Nov 27, 2020 via email

@mcdafydd
Copy link
Owner

Hello,

I think we can remove the NewRequestEx() approach. We do something similar with a custom baseURL here:

URL := fmt.Sprintf("%s%s/_apis/graph/users?api-version=5.1-preview.1",
s.client.VsspsBaseURL.String(),
owner,

Also, would you add a simple test for each func and add omitempty to any receiving (response) JSON struct members?

Appreciate the submission!

@tapaszto
Copy link
Author

Hi,

I will make it on Monday, thanks.

@tapaszto
Copy link
Author

Hi @mcdafydd,

I made the requested changes, can You please review it, and approve the PR?

@mcdafydd mcdafydd merged commit ecbe5db into mcdafydd:master Dec 1, 2020
@tapaszto
Copy link
Author

tapaszto commented Dec 2, 2020

Hi @mcdafydd,

Thanks for merging the PR, can You roll out a new release?

@mcdafydd
Copy link
Owner

mcdafydd commented Dec 3, 2020

Oh yes - sorry about that.

@mcdafydd
Copy link
Owner

mcdafydd commented Dec 3, 2020

Pushed tag v0.12.0

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.

3 participants