Skip to content

Commit b20cf2c

Browse files
committed
fix: fix repository collaborators table
1 parent c19d6cb commit b20cf2c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

discovery/describers/organization_collaborators.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ func GetOrganizationCollaborators(ctx context.Context, githubClient model.GitHub
7070
for _, node := range query.Organization.Repositories.Nodes {
7171
repoFullName := formRepositoryFullName(org, string(node.Name))
7272
for _, collaborator := range node.Collaborators.Edges {
73-
id := fmt.Sprintf("%s/%s", repoFullName, collaborator.Node.Login)
73+
id := fmt.Sprintf("%s/%s/%s", repoFullName, collaborator.Node.Login, string(collaborator.Permission))
7474
value := models.Resource{
7575
ID: id,
7676
Name: repoFullName,

discovery/describers/repository_collaborators.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ package describers
22

33
import (
44
"context"
5-
"strconv"
6-
5+
"fmt"
76
"github.com/opengovern/og-describer-github/discovery/pkg/models"
87
model "github.com/opengovern/og-describer-github/discovery/provider"
98
"github.com/shurcooL/githubv4"
@@ -72,8 +71,9 @@ func GetRepositoryCollaborators(ctx context.Context, githubClient model.GitHubCl
7271
return nil, err
7372
}
7473
for _, collaborator := range query.Repository.Collaborators.Edges {
74+
id := fmt.Sprintf("%s/%s/%s", repoFullName, collaborator.Node.Login, string(collaborator.Permission))
7575
value := models.Resource{
76-
ID: strconv.Itoa(collaborator.Node.Id),
76+
ID: id,
7777
Name: collaborator.Node.Name,
7878
Description: model.RepoCollaboratorsDescription{
7979
Affiliation: "ALL",

0 commit comments

Comments
 (0)