func New(owner, repo, key string) (*Gh, error) {
	c := github.NewClient(httpClient())
	baseURL := os.Getenv("GITHUB_BASE_URL")
	if baseURL == "" {
		baseURL = os.Getenv("GITHUB_API_URL")
	} else {
		_, _ = fmt.Fprintf(os.Stderr, "%s\n", "env GITHUB_BASE_URL is deprecated. Use GITHUB_API_URL")
	}
	if baseURL != "" {
		baseEndpoint, err := url.Parse(baseURL)
		if err != nil {
			return nil, err
		}
		if !strings.HasSuffix(baseEndpoint.Path, "/") {
			baseEndpoint.Path += "/"
		}
		c.BaseURL = baseEndpoint
	}
	if uploadURL := os.Getenv("GITHUB_UPLOAD_URL"); uploadURL != "" {
		uploadEndpoint, err := url.Parse(uploadURL)
		if err != nil {
			return nil, err
		}
		if !strings.HasSuffix(uploadEndpoint.Path, "/") {
			uploadEndpoint.Path += "/"
		}
		c.UploadURL = uploadEndpoint
	}
	return &Gh{
		client: c,
		owner:  owner,
		repo:   repo,
		key:    key,
	}, nil
}
New return Gh
package gh
import (
	"context"
	"errors"
	"fmt"
	"io"
	"io/ioutil"
	"net"
	"net/http"
	"net/url"
	"os"
	"path"
	"path/filepath"
	"strconv"
	"strings"
	"time"
	"github.com/google/go-github/v39/github"
)
const (
	defaultBaseURL = "https://api.github.com/"
	uploadBaseURL  = "https://uploads.github.com/"
	footerFormat   = "<!-- Put by ghput %s-->"
)
type Gh struct {
	client *github.Client
	owner  string
	repo   string
	key    string
}