Summarize provides generic statistics for a given org and serializes them to disc
()
| 521 | // Summarize provides generic statistics for a given org and serializes them |
| 522 | // to disc |
| 523 | func (org *Organization) Summarize() *types.OrgCoreStats { |
| 524 | var collaborators []string |
| 525 | for u := range org.Collaborators { |
| 526 | collaborators = append(collaborators, u) |
| 527 | } |
| 528 | futils.SerializeFile( |
| 529 | OrgStats{ |
| 530 | CoreStats: org.CoreStats, |
| 531 | Collaborators: collaborators, |
| 532 | Webhooks: org.Webhooks, |
| 533 | Installations: org.Installations, |
| 534 | Runners: org.Runners, |
| 535 | }, |
| 536 | filepath.Join(futils.StatsDir, "orgCoreStats.json"), |
| 537 | ) |
| 538 | return org.CoreStats |
| 539 | } |
| 540 | |
| 541 | func (org *Organization) AuditMemberPermissions( |
| 542 | ctx context.Context) ([]issue.Issue, map[issue.IssueID]error, error) { |