Skip to content

Commit

Permalink
add repo field
Browse files Browse the repository at this point in the history
Signed-off-by: Jeffrey Sica <[email protected]>
  • Loading branch information
jeefy committed Oct 8, 2023
1 parent 33d7487 commit 9a73e40
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ type Presentations []struct {
}
Projects []string `yaml:"projects"`
Tags []string `yaml:"tags"`
Repos []string `yaml:"repos"`
}
6 changes: 6 additions & 0 deletions pkg/verify/verify.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,12 @@ func Verify(f string) error {
}
}

for _, repo := range entry.Repos {
if resp, err := http.Get(repo); err != nil || resp.StatusCode >= 400 {
errors = append(errors, fmt.Errorf("invalid repo URL: %s", repo))
}
}

for _, presenter := range entry.Presenters {
if presenter.Github != "" {
githubURL := fmt.Sprintf("https://github.com/%s", presenter.Github)
Expand Down

0 comments on commit 9a73e40

Please sign in to comment.