MCPcopy Index your code
hub / github.com/rilldata/rill / token

Method token

admin/github.go:234–248  ·  view source on GitHub ↗
(ctx context.Context, client *github.Client)

Source from the content-addressed store, hash-verified

232}
233
234func (g *githubClient) token(ctx context.Context, client *github.Client) (string, time.Time, error) {
235 tr, ok := client.Client().Transport.(*ghinstallation.Transport)
236 if !ok {
237 return "", time.Time{}, fmt.Errorf("transport is not of type *ghinstallation.Transport")
238 }
239 t, err := tr.Token(ctx)
240 if err != nil {
241 return "", time.Time{}, err
242 }
243 _, expiry, err := tr.Expiry()
244 if err != nil {
245 return "", time.Time{}, err
246 }
247 return t, expiry, nil
248}
249
250func (s *Service) CreateManagedGitRepo(ctx context.Context, org *database.Organization, name, ownerID string, autoInit bool) (*github.Repository, error) {
251 if org.QuotaProjects >= 0 {

Callers 2

InstallationTokenMethod · 0.95

Calls 3

ErrorfMethod · 0.65
TokenMethod · 0.65
ClientMethod · 0.45

Tested by

no test coverage detected