Skip to content

Commit 37eee5f

Browse files
committed
Fix argument order.
1 parent 346185e commit 37eee5f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

internal/push/push.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,12 +99,12 @@ func (pushService *pushService) createRepository() (*github.Repository, error) {
9999
}
100100
}
101101

102-
_, response, err = pushService.githubEnterpriseClient.Organizations.IsMember(pushService.ctx, user.GetLogin(), pushService.destinationRepositoryOwner)
102+
_, response, err = pushService.githubEnterpriseClient.Organizations.IsMember(pushService.ctx, pushService.destinationRepositoryOwner, user.GetLogin())
103103
if err != nil {
104104
return nil, errors.Wrap(err, "Failed to check membership of destination organization.")
105105
}
106106
if (response.StatusCode == http.StatusFound || response.StatusCode == http.StatusNotFound) && githubapiutil.HasAnyScope(response, "site_admin") {
107-
log.Debugf("No access to destination organization. Switching to impersonation token for %s...", pushService.actionsAdminUser)
107+
log.Debugf("No access to destination organization (status code %d). Switching to impersonation token for %s...", response.StatusCode, pushService.actionsAdminUser)
108108
impersonationToken, _, err := pushService.githubEnterpriseClient.Admin.CreateUserImpersonation(pushService.ctx, pushService.actionsAdminUser, &github.ImpersonateUserOptions{Scopes: []string{minimumRepositoryScope, "workflow"}})
109109
if err != nil {
110110
return nil, errors.Wrap(err, "Failed to impersonate Actions admin user.")

0 commit comments

Comments
 (0)