Skip to content

Commit 418f047

Browse files
authored
Merge pull request #174 from jeefy/main
add repo field
2 parents 33d7487 + 9a73e40 commit 418f047

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

pkg/types/types.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,5 @@ type Presentations []struct {
2222
}
2323
Projects []string `yaml:"projects"`
2424
Tags []string `yaml:"tags"`
25+
Repos []string `yaml:"repos"`
2526
}

pkg/verify/verify.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,12 @@ func Verify(f string) error {
6161
}
6262
}
6363

64+
for _, repo := range entry.Repos {
65+
if resp, err := http.Get(repo); err != nil || resp.StatusCode >= 400 {
66+
errors = append(errors, fmt.Errorf("invalid repo URL: %s", repo))
67+
}
68+
}
69+
6470
for _, presenter := range entry.Presenters {
6571
if presenter.Github != "" {
6672
githubURL := fmt.Sprintf("https://github.com/%s", presenter.Github)

0 commit comments

Comments
 (0)