chore: expose client base url
Some checks failed
Security Scan / security (push) Successful in 10s
Test / test (push) Has been cancelled

Co-Authored-By: Virgil <virgil@lethean.io>
This commit is contained in:
Virgil 2026-04-02 02:47:06 +00:00
parent d2228a0935
commit a0dee7c40a
2 changed files with 8 additions and 0 deletions

View file

@ -117,6 +117,11 @@ type Client struct {
rateLimit RateLimit
}
// BaseURL returns the configured Forgejo base URL.
func (c *Client) BaseURL() string {
return c.baseURL
}
// RateLimit returns the last known rate limit information.
func (c *Client) RateLimit() RateLimit {
return c.rateLimit

View file

@ -33,6 +33,9 @@ func TestForge_Client_Good(t *testing.T) {
if c.baseURL != "https://forge.lthn.ai" {
t.Errorf("got baseURL=%q", c.baseURL)
}
if got := c.BaseURL(); got != "https://forge.lthn.ai" {
t.Errorf("got BaseURL()=%q", got)
}
}
func TestRepoService_ListOrgRepos_Good(t *testing.T) {