Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
20bc6cd3
Commit
20bc6cd3
authored
Nov 15, 2018
by
Alexander Matyushentsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Full list of groups should include group names as well as group_name:team_name
parent
e5ebcf51
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
github.go
connector/github/github.go
+1
-2
github_test.go
connector/github/github_test.go
+3
-0
No files found.
connector/github/github.go
View file @
20bc6cd3
...
...
@@ -391,9 +391,8 @@ func (c *githubConnector) userGroups(ctx context.Context, client *http.Client) (
groups
:=
make
([]
string
,
0
)
for
_
,
o
:=
range
orgs
{
if
teams
,
ok
:=
orgTeams
[
o
];
!
ok
{
groups
=
append
(
groups
,
o
)
}
else
{
if
teams
,
ok
:=
orgTeams
[
o
];
ok
{
for
_
,
t
:=
range
teams
{
groups
=
append
(
groups
,
formatTeamName
(
o
,
t
))
}
...
...
connector/github/github_test.go
View file @
20bc6cd3
...
...
@@ -53,9 +53,11 @@ func TestUserGroups(t *testing.T) {
expectNil
(
t
,
err
)
expectEquals
(
t
,
groups
,
[]
string
{
"org-1"
,
"org-1:team-1"
,
"org-1:team-2"
,
"org-1:team-3"
,
"org-2"
,
"org-2:team-4"
,
"org-3"
,
})
...
...
@@ -95,6 +97,7 @@ func TestUserGroupsWithTeamNameFieldConfig(t *testing.T) {
expectNil
(
t
,
err
)
expectEquals
(
t
,
groups
,
[]
string
{
"org-1"
,
"org-1:team-1"
,
})
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment