Skip to content

Commit

Permalink
Validate Dalamud API level
Browse files Browse the repository at this point in the history
  • Loading branch information
karashiiro committed May 21, 2022
1 parent 7f746c3 commit 02d4c50
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions pkg/html/report-problems.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@
{{if not .AssemblyVersionSet}}
<li><span>No version set</span></li>
{{end}}
{{if not .DalamudAPILevelSet}}
<li><span>No Dalamud API level set</span></li>
{{end}}
{{if not .RepoURLSet}}
<li><span>No repo URL set</span></li>
{{end}}
Expand Down
3 changes: 2 additions & 1 deletion pkg/repos/plogons/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type PlogonMeta struct {
ApplicableVersion string
ImageURLs []string `json:"ImageUrls"`
IconURL string `json:"IconUrl"`
DalamudApiLevel int
DalamudAPILevel int `json:"DalamudApiLevel"`
LoadPriority int
}

Expand All @@ -45,6 +45,7 @@ type PlogonMetaValidationResult struct {
InternalNameSet bool
DescriptionSet bool
AssemblyVersionSet bool
DalamudAPILevelSet bool
RepoURLSet bool
PunchlineSet bool
MatchesZipped bool
Expand Down
4 changes: 4 additions & 0 deletions pkg/repos/plogons/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ func ValidatePullRequest(pr *github.PullRequest) (*PlogonMetaValidationResult, e
res.AssemblyVersionSet = true
}

if uncompressedMeta.DalamudAPILevel != 0 {
res.DalamudAPILevelSet = true
}

if uncompressedMeta.RepoURL != "" {
res.RepoURLSet = true
}
Expand Down

0 comments on commit 02d4c50

Please sign in to comment.