You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: github.go
    path of file: ./repos/rill/runtime/drivers/github
    
    the code of the file until where you have to start completion: package github

import (
	"context"
	"encoding/json"
	"errors"
	"fmt"
	"net/http"
	"os"
	"path/filepath"
	"strconv"
	"sync/atomic"
	"time"

	"github.com/bradleyfalzon/ghinstallation/v2"
	"github.com/eapache/go-resiliency/retrier"
	"github.com/go-git/go-git/v5"
	"github.com/go-git/go-git/v5/plumbing"
	"github.com/go-git/go-git/v5/plumbing/transport"
	"github.com/rilldata/rill/runtime/drivers"
	"github.com/rilldata/rill/runtime/pkg/activity"
	"go.opentelemetry.io/otel"
	"go.opentelemetry.io/otel/attribute"
	"go.opentelemetry.io/otel/trace"
	"go.uber.org/zap"
	"golang.org/x/sync/singl
    
func (d driver) Open(config map[string]any, shared bool, client *activity.Client, logger *zap.Logger) (drivers.Handle, error) {
	if shared {
		return nil, fmt.Errorf("github driver can't be shared")
	}
	dsnStr, ok := config["dsn"].(string)
	if !ok {
		return nil, fmt.Errorf("require dsn to open github connection")
	}

	var dsn DSN
	err := json.Unmarshal([]byte(dsnStr), &dsn)
	if err != nil {
		return nil, err
	}

	tempdir, err := os.MkdirTemp("", "github_repo_driver")
	if err != nil {
		return nil, err
	}

	tempdir, err = filepath.Abs(tempdir)
	if err != nil {
		return nil, err
	}

	projectDir := tempdir
	if dsn.Subpath != "" {
		projectDir = filepath.Join(tempdir, dsn.Subpath)
	}

	// NOTE :: project isn't cloned yet
	return &connection{
		config:       config,
		dsn:          dsn,
		tempdir:      tempdir,
		projectdir:   projectDir,
		singleflight: &singleflight.Group{},
		shared:       shared,
	}, nil
}