MCPcopy Create free account
hub / github.com/atripati/ark / simplifyRepo

Function simplifyRepo

pkg/tools/github.go:864–887  ·  view source on GitHub ↗
(raw string)

Source from the content-addressed store, hash-verified

862}
863
864func simplifyRepo(raw string) (string, error) {
865 var r map[string]interface{}
866 if err := json.Unmarshal([]byte(raw), &r); err != nil {
867 return raw, nil
868 }
869
870 simple := stripNulls(map[string]interface{}{
871 "name": r["name"],
872 "full_name": r["full_name"],
873 "description": r["description"],
874 "language": r["language"],
875 "stars": r["stargazers_count"],
876 "forks": r["forks_count"],
877 "open_issues": r["open_issues_count"],
878 "default_branch": r["default_branch"],
879 "created_at": r["created_at"],
880 "updated_at": r["updated_at"],
881 "private": r["private"],
882 "url": r["html_url"],
883 })
884
885 out, _ := json.Marshal(simple)
886 return string(out), nil
887}
888
889func simplifyIssueList(raw string) (string, error) {
890 var issues []map[string]interface{}

Callers 1

getRepoMethod · 0.85

Calls 1

stripNullsFunction · 0.85

Tested by

no test coverage detected