2024-02-14 23:03:30 +03:00
|
|
|
package gogs
|
|
|
|
|
2024-03-15 21:18:58 +03:00
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
|
|
|
|
"git.unistack.org/unistack-org/pkgdash/internal/configcli"
|
|
|
|
"git.unistack.org/unistack-org/pkgdash/internal/modules"
|
|
|
|
)
|
|
|
|
|
2024-02-14 23:03:30 +03:00
|
|
|
type Gogs struct {
|
|
|
|
Token string
|
|
|
|
}
|
|
|
|
|
2024-03-15 21:18:58 +03:00
|
|
|
func NewGogs(cfg configcli.Config) *Gogs {
|
2024-02-14 23:03:30 +03:00
|
|
|
return &Gogs{
|
2024-03-15 21:18:58 +03:00
|
|
|
Token: cfg.Source.Token,
|
2024-02-14 23:03:30 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-15 21:18:58 +03:00
|
|
|
func (g *Gogs) RequestOpen(ctx context.Context, branch string, path string, mod modules.Update) error {
|
|
|
|
return nil
|
|
|
|
}
|
2024-03-21 14:36:32 +03:00
|
|
|
func (g *Gogs) RequestClose(ctx context.Context, branch string, path string) error {
|
2024-03-15 21:18:58 +03:00
|
|
|
return nil
|
|
|
|
}
|
2024-03-21 14:36:32 +03:00
|
|
|
func (g *Gogs) RequestUpdate(ctx context.Context, branch string, path string, mod modules.Update) error {
|
2024-03-15 21:18:58 +03:00
|
|
|
return nil
|
|
|
|
}
|