AuraRepo > Commit [f8c6941]

Christian Lee Seibold

Sat March 15, 2025 10:49 PM -0500

Add clone URL option

Signed-off-by: Christian Lee Seibold 


 context.go | 9 +++++----
 git.go     | 5 +++++

Commit Hash: f8c694171a9c6c08c74eafa6ebd7d2a6f7710ac6

Tree Hash: 1e4a97cff6275be540dbc40711a9b0d643f7e6fe

Date: 2025-03-15T22:49:58-05:00

PGP Signature: -----BEGIN PGP SIGNATURE-----

iHUEABYKAB0WIQSghH500ekD7Pc/Zj6PbjnL2ZXQ4AUCZ9ZKZgAKCRCPbjnL2ZXQ

4K7QAP4zyh1xtZIYAgHKed6YovMl4/944mkahlKXMNMLESaOYAD/SA7b7tfRsnoj

+sdejKsjVjBPj0bqDIMPNkMP34NH5QE=

=PYHu

-----END PGP SIGNATURE-----

Browse Tree
Parent c1b2300
Commits
Repo Home

Changes

context.go

   ... | ...
    42 | 	AuraRepoFeature_Email
    43 | 	AuraRepoFeature_Misfin
    44 | )
    45 | 
    46 | type AuraRepoContext struct {
-   47 | 	title           string
-   48 | 	repos           map[string]*Repo
-   49 | 	repos_directory string
+   47 | 	title             string
+   48 | 	repos             map[string]*Repo
+   49 | 	repos_directory   string
+   50 | 	http_clone_prefix string
    50 | 	//repo             *git.Repository // TODO: Set config values, like committer/user (for when repo is modified in interface).
    51 | 	enabled_features bitset.BitSet[AuraRepoFeature, AuraRepoFeature]
    52 | }
    53 | 
    54 | type Repo struct {
   ... | ...
    62 | 
    63 | func (repo *Repo) EscapedId() string {
    64 | 	return url.PathEscape(repo.Id)
    65 | }
    66 | 
-   67 | func NewAuraRepoContext(title string, directory string) *AuraRepoContext {
+   68 | func NewAuraRepoContext(title string, directory string, http_clone_prefix string) *AuraRepoContext {
    68 | 	context := &AuraRepoContext{title: title, repos_directory: directory}
    69 | 	context.repos = make(map[string]*Repo)
    70 | 	/*var err error
    71 | 	context.repo, err = git.PlainOpen("./test-repo/")
    72 | 	if errors.Is(err, git.ErrRepositoryNotExists) {

git.go

   ... | ...
   198 | 		request.Link("/wiki/", "Project Wiki")
   199 | 	}
   200 | 
   201 | 	request.Gemini("\n")
   202 | 
+  203 | 	if c.http_clone_prefix != "" {
+  204 | 		request.Link(fmt.Sprintf("%s/%s", c.http_clone_prefix, repo.Path), "Clone URL")
+  205 | 		request.Gemini("\n")
+  206 | 	}
+  207 | 
   203 | 	// Show the five Latest Commits
   204 | 	request.Gemini("\n## Latest Commits\n\n")
   205 | 	showNum := 5
   206 | 	iterator, _ := repo.Log(&git.LogOptions{From: bcommit.Hash, Order: git.LogOrderCommitterTime})
   207 | 	i := 0

main/main (created)

Binary content not displayed.