Skip to content

feat: Add assignment for org role associations - #3371

Merged
gmlewis merged 1 commit into
google:masterfrom
stevehipwell:add-assignment
Dec 9, 2024
Merged

feat: Add assignment for org role associations#3371
gmlewis merged 1 commit into
google:masterfrom
stevehipwell:add-assignment

Conversation

@stevehipwell

Copy link
Copy Markdown
Contributor

Resolves#3364

This PR adds the Assignment field to Team & User and the InheritedFrom field to User when accessed in the context of an organization role.

@gmlewisgmlewis changed the title feat: Added assignment for org role associationsfeat: Add assignment for org role associationsDec 9, 2024
@codecov

codecovBot commented Dec 9, 2024

Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.30%. Comparing base (2b8c7fa) to head (1c73510).
Report is 185 commits behind head on master.

Additional details and impacted files
@@ Coverage Diff @@## master #3371 +/- ##
==========================================
- Coverage 97.72% 92.30% -5.42% 
==========================================
Files 153 176 +23 Lines 13390 15031 +1641 ==========================================
+ Hits 13085 13874 +789 - Misses 215 1064 +849 - Partials 90 93 +3 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Steve Hipwell <steve.hipwell@gmail.com>

@gmlewisgmlewis left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you, @stevehipwell !
LGTM.
Merging.

@gmlewis
gmlewis merged commit 1616008 into google:masterDec 9, 2024
@stevehipwell
stevehipwell deleted the add-assignment branch December 10, 2024 13:04
Comment threadgithub/users.go
Assignment *string `json:"assignment,omitempty"`
// InheritedFrom identifies the team that a user inherited their organization role
// from. This is only populated when calling the ListUsersAssignedToOrgRole method.
InheritedFrom *Team `json:"inherited_from,omitempty"`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@stevehipwell the inherited_from field returns for me as an array which fails the unmarshalling, are you sure you got only a single team in the API result?

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

I think the schema might have changed as it's now looks like an array, but I'm pretty sure I tested this.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I want to change this field to an array can you verify it doesn't break anything for you? I want to know if we need to support both cases

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@stevehipwell I opened this: #3460

jlaportebot added a commit to jlaportebot/go-github that referenced this pull request Jun 28, 2026
Sign up for freeto 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.

Add support for assignment on teams and users assigned to organization roles

3 participants

@stevehipwell@gmlewis@tomfeigin