Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set GitHub app to use slug to make --hide-prev-plan-comments more reliable #2697

Merged
merged 2 commits into from
Nov 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion server/events/vcs/github_credentials.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion server/events/vcs/github_credentials_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down