Skip to content

Commit

Permalink
Merge pull request #174 from jeefy/main
Browse files Browse the repository at this point in the history
add repo field
  • Loading branch information
jeefy authored Oct 9, 2023
2 parents 33d7487 + 9a73e40 commit 418f047
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 418f047

Please sign in to comment.