2024-02-14 23:03:30 +03:00
|
|
|
package github
|
|
|
|
|
2024-03-15 21:18:58 +03:00
|
|
|
import (
|
|
|
|
"context"
|
2024-03-31 14:49:40 +03:00
|
|
|
"fmt"
|
2024-03-15 21:18:58 +03:00
|
|
|
|
|
|
|
"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 Github struct {
|
|
|
|
Token string
|
|
|
|
}
|
|
|
|
|
2024-03-15 21:18:58 +03:00
|
|
|
func NewGithub(cfg configcli.Config) *Github {
|
2024-02-14 23:03:30 +03:00
|
|
|
return &Github{
|
2024-03-15 21:18:58 +03:00
|
|
|
Token: cfg.Source.Token,
|
2024-02-14 23:03:30 +03:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-03-31 14:49:40 +03:00
|
|
|
func (g *Github) Name() string {
|
|
|
|
return "github"
|
|
|
|
}
|
|
|
|
|
2024-03-15 21:18:58 +03:00
|
|
|
func (g *Github) RequestOpen(ctx context.Context, branch string, path string, mod modules.Update) error {
|
2024-03-31 14:49:40 +03:00
|
|
|
return fmt.Errorf("implement me")
|
2024-03-15 21:18:58 +03:00
|
|
|
}
|
2024-03-21 14:36:32 +03:00
|
|
|
func (g *Github) RequestClose(ctx context.Context, branch string, path string) error {
|
2024-03-31 14:49:40 +03:00
|
|
|
return fmt.Errorf("implement me")
|
2024-03-15 21:18:58 +03:00
|
|
|
}
|
2024-03-21 14:36:32 +03:00
|
|
|
func (g *Github) RequestUpdate(ctx context.Context, branch string, path string, mod modules.Update) error {
|
2024-03-31 14:49:40 +03:00
|
|
|
return fmt.Errorf("implement me")
|
2024-03-15 21:18:58 +03:00
|
|
|
}
|
2024-03-23 18:52:13 +03:00
|
|
|
func (g *Github) RequestList(ctx context.Context, branch string) (map[string]string, error) {
|
2024-03-31 14:49:40 +03:00
|
|
|
return nil, fmt.Errorf("implement me")
|
2024-03-23 18:52:13 +03:00
|
|
|
}
|