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
5894d017
Commit
5894d017
authored
Aug 17, 2017
by
Eric Stroczynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
connector/github: debug->info logging, more informative userInOrg msg
parent
b84721cb
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
4 deletions
+2
-4
github.go
connector/github/github.go
+2
-4
No files found.
connector/github/github.go
View file @
5894d017
...
...
@@ -350,9 +350,8 @@ func (c *githubConnector) listGroups(ctx context.Context, client *http.Client, u
// 'teams' list in config.
if
len
(
org
.
Teams
)
==
0
{
inOrgNoTeams
=
true
c
.
logger
.
Debugf
(
"github: user %q in org %q"
,
userName
,
org
.
Name
)
}
else
if
teams
=
filterTeams
(
teams
,
org
.
Teams
);
len
(
teams
)
==
0
{
c
.
logger
.
Debug
f
(
"github: user %q in org %q but no teams"
,
userName
,
org
.
Name
)
c
.
logger
.
Info
f
(
"github: user %q in org %q but no teams"
,
userName
,
org
.
Name
)
}
// Orgs might have the same team names. We append orgPrefix to team name,
...
...
@@ -360,7 +359,6 @@ func (c *githubConnector) listGroups(ctx context.Context, client *http.Client, u
orgPrefix
:=
org
.
Name
+
":"
for
_
,
teamName
:=
range
teams
{
groups
=
append
(
groups
,
orgPrefix
+
teamName
)
c
.
logger
.
Debugf
(
"github: user %q in org %q team %q"
,
userName
,
org
.
Name
,
teamName
)
}
}
if
inOrgNoTeams
||
len
(
groups
)
>
0
{
...
...
@@ -542,7 +540,7 @@ func (c *githubConnector) userInOrg(ctx context.Context, client *http.Client, us
switch
resp
.
StatusCode
{
case
http
.
StatusNoContent
:
case
http
.
StatusFound
,
http
.
StatusNotFound
:
c
.
logger
.
Debugf
(
"github: user %q not in org %q
"
,
userName
,
orgName
)
c
.
logger
.
Infof
(
"github: user %q not in org %q or application not authorized to read org data
"
,
userName
,
orgName
)
default
:
err
=
fmt
.
Errorf
(
"github: unexpected return status: %q"
,
resp
.
Status
)
}
...
...
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