mirror of
https://git.vectorsigma.ru/public/atlantis.git
synced 2026-08-04 00:18:41 +00:00
Fix GitHub app uses slug as user name to work --hide-prev-plan-comments correctly (#2697)
* Fix GitHub app uses slug as user name * Update server/events/vcs/github_credentials_test.go Co-authored-by: PePe Amengual <jose.amengual@gmail.com> Co-authored-by: nitrocode <7775707+nitrocode@users.noreply.github.com> Co-authored-by: PePe Amengual <jose.amengual@gmail.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user