Skip to content

Commit b0b9de6

Browse files
committed
[BB-454] baton-github: add expandable annotation to team
1 parent 74f9764 commit b0b9de6

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

pkg/connector/repository.go

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,18 @@ func (o *repositoryResourceType) Grants(
227227
return nil, "", nil, err
228228
}
229229

230-
rv = append(rv, grant.NewGrant(resource, permission, tr.Id, grant.WithAnnotation(&v2.V1Identifier{
231-
Id: fmt.Sprintf("repo-grant:%s:%d:%s", resource.Id.Resource, team.GetID(), permission),
232-
})))
230+
rv = append(rv, grant.NewGrant(resource, permission, tr.Id, grant.WithAnnotation(
231+
&v2.V1Identifier{
232+
Id: fmt.Sprintf("repo-grant:%s:%d:%s", resource.Id.Resource, team.GetID(), permission),
233+
},
234+
&v2.GrantExpandable{
235+
EntitlementIds: []string{
236+
entitlement.NewEntitlementID(tr, teamRoleMaintainer),
237+
entitlement.NewEntitlementID(tr, teamRoleMember),
238+
},
239+
Shallow: true,
240+
},
241+
)))
233242
}
234243
}
235244
default:

0 commit comments

Comments
 (0)