oficina / equipo Public

Clone
git clone https://amadan.net/oficina/equipo

Plain git — no account needed to clone.

Download

Download this file

1package equipo
2
3import (
4 "amadan.net/oficina/equipo/internal/equipo/github"
5 "gorm.io/gorm"
6)
7
8func (s *Store) configureGitHub(cfg Config) {
9 s.forge = &github.Store{
10 DB: s.db.G, Write: s.write, Root: cfg.InstanceKey, Origin: cfg.Origin, Enabled: cfg.GitHubEnabled,
11 Now: s.runnerClock.Now, API: github.NewAPI(cfg.GitHubTransport, s.runnerClock.Now),
12 Owner: func(tx *gorm.DB, person string) error { return requireOwner(tx, Actor{Address: person}) },
13 Audit: func(tx *gorm.DB, person, kind, id string) error {
14 return appendAudit(tx, Actor{Address: person}, kind, id)
15 },
16 // Trusted expiry maintenance reads the current roster in its transaction.
17 // It erases authority even if the initiating owner has since been removed.
18 Maintain: func(tx *gorm.DB) error { var members []Member; return tx.Find(&members).Error },
19 }
20}
21