func (d *DB) CreateSubscription(convID chat1.ConvIDStr, repo string, oauthIdentifier string) error {
	return d.RunTxn(func(tx *sql.Tx) error {
		_, err := tx.Exec(`
			INSERT INTO subscriptions
			(conv_id, repo, oauth_identifier)
			VALUES (?, ?, ?)
			ON DUPLICATE KEY UPDATE
			oauth_identifier=VALUES(oauth_identifier)
		`, convID, repo, oauthIdentifier)
		return err
	})
}
webhook subscription methods
package gitlabbot
import (
	"database/sql"
	"github.com/keybase/go-keybase-chat-bot/kbchat/types/chat1"
	"github.com/keybase/managed-bots/base"
	"golang.org/x/oauth2"
)
type DB struct {
	*base.DB
}
func NewDB(db *sql.DB) *DB {
	return &DB{
		DB: base.NewDB(db),
	}
}