Skip to content

Commit

Permalink
/ on wrong position
Browse files Browse the repository at this point in the history
  • Loading branch information
cooperspencer committed Apr 2, 2024
1 parent 7175ab6 commit 9ff84fd
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions sourcehut/sourcehut.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func getCommits(url, reponame, token string) (Commits, error) {

// getRefs TODO
func getRefs(url, name, token string) (Refs, error) {
body, err := doRequest(fmt.Sprintf("%s/%s/refs", url, name), token)
body, err := doRequest(fmt.Sprintf("%s%s/refs", url, name), token)
if err != nil {
return Refs{}, err
}
Expand Down Expand Up @@ -142,13 +142,6 @@ func Get(conf *types.Conf) ([]types.Repo, bool) {
ran := false
repos := []types.Repo{}
for _, repo := range conf.Source.Sourcehut {
sub = logger.CreateSubLogger("stage", "sourcehut", "url", repo.URL)
err := repo.Filter.ParseDuration()
if err != nil {
sub.Error().
Msg(err.Error())
}
ran = true
if repo.URL == "" {
repo.URL = "https://git.sr.ht"
}
Expand All @@ -157,6 +150,14 @@ func Get(conf *types.Conf) ([]types.Repo, bool) {
repo.URL += "/"
}

sub = logger.CreateSubLogger("stage", "sourcehut", "url", repo.URL)
err := repo.Filter.ParseDuration()
if err != nil {
sub.Error().
Msg(err.Error())
}
ran = true

apiURL := fmt.Sprintf("%sapi/", repo.URL)

token := repo.GetToken()
Expand Down

0 comments on commit 9ff84fd

Please sign in to comment.