Documentation
¶
Index ¶
- Constants
- Variables
- func CloneRepository(repoURL string, projectPath string, githubToken string, githubUser string, ...) error
- func ExtractTypeScriptCode(response string) string
- func FlagsToArgs(flags map[string]string) []string
- func ProjectPathFmt(projectPath string) string
- func SaveProjects(projects *ProjectsJSON) error
- type Project
- type ProjectsJSON
Constants ¶
View Source
const ( ProjectsFile = "projects.json" ScriptsFolder = "scripts" ResultsFolder = "results" QueryPrompt = "QUERY_PROMPT.md" )
Variables ¶
View Source
var DEFAULT_FLAGS = map[string]string{}
Functions ¶
func CloneRepository ¶
func CloneRepository(repoURL string, projectPath string, githubToken string, githubUser string, updateToken bool, flags map[string]string) error
CloneRepository either clones the repository if not present or pulls the latest changes if already cloned.
func ExtractTypeScriptCode ¶
extractTypeScriptCode finds the first ```ts or ```typescript code block in a string and returns its contents.
func FlagsToArgs ¶ added in v0.5.2
func ProjectPathFmt ¶ added in v0.5.2
func SaveProjects ¶
func SaveProjects(projects *ProjectsJSON) error
SaveProjects writes the ProjectsJSON struct to projects.json.
Types ¶
type Project ¶
type Project struct {
Name string `json:"name"`
Path string `json:"path"`
RepoURL string `json:"repoUrl"`
Topics []string `json:"topics"`
Skip bool `json:"skip,omitempty"`
Metadata interface{} `json:"metadata,omitempty"`
Git map[string]string `json:"git,omitempty"`
}
Project and ProjectsJSON store information about cloned repos
func FilterProjectsByTopics ¶
This is the defineition
func InProject ¶ added in v0.3.41
func InProject(pj *ProjectsJSON) *Project
type ProjectsJSON ¶
func LoadProjects ¶
func LoadProjects() (*ProjectsJSON, error)
Click to show internal directories.
Click to hide internal directories.