diff --git a/server/events/vcs/github_credentials.go b/server/events/vcs/github_credentials.go index d70376c14..ef64cbce7 100644 --- a/server/events/vcs/github_credentials.go +++ b/server/events/vcs/github_credentials.go @@ -108,7 +108,7 @@ func (c *GithubAppCredentials) GetUser() (string, error) { } // Currently there is no way to get the bot's login info, so this is a // hack until Github exposes that. - return fmt.Sprintf("%s[bot]", app.GetName()), nil + return fmt.Sprintf("%s[bot]", app.GetSlug()), nil } // GetToken returns a fresh installation token. diff --git a/server/events/vcs/github_credentials_test.go b/server/events/vcs/github_credentials_test.go index 08b3de617..1150194d0 100644 --- a/server/events/vcs/github_credentials_test.go +++ b/server/events/vcs/github_credentials_test.go @@ -30,7 +30,7 @@ func TestGithubClient_GetUser_AppSlug(t *testing.T) { user, err := appCreds.GetUser() Ok(t, err) - Assert(t, user == "Octocat App[bot]", "user should not empty") + Assert(t, user == "octoapp[bot]", "user should not be empty") } func TestGithubClient_AppAuthentication(t *testing.T) {