mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-25 11:22:16 +00:00
refactor: sourcehut_builds ignore unused fields
This commit is contained in:
parent
c9f38e2813
commit
1f6f909b2e
2 changed files with 45 additions and 46 deletions
|
@ -264,19 +264,13 @@ func (pc sourcehutConvertor) buildManifest(repo *api.Repository, commitID, gitRe
|
|||
return []byte(msg), fmt.Errorf(msg+": %w", err)
|
||||
}
|
||||
defer r.Close()
|
||||
|
||||
// reference: https://man.sr.ht/builds.sr.ht/manifest.md
|
||||
var manifest struct {
|
||||
Image yaml.Node `yaml:"image"`
|
||||
Arch yaml.Node `yaml:"arch,omitempty"`
|
||||
Packages yaml.Node `yaml:"packages,omitempty"`
|
||||
Repositories yaml.Node `yaml:"repositories,omitempty"`
|
||||
Artifacts yaml.Node `yaml:"artifacts,omitempty"`
|
||||
Shell yaml.Node `yaml:"shell,omitempty"`
|
||||
Sources []string `yaml:"sources"`
|
||||
Tasks yaml.Node `yaml:"tasks"`
|
||||
Triggers yaml.Node `yaml:"triggers,omitempty"`
|
||||
Environment map[string]string `yaml:"environment"`
|
||||
Secrets yaml.Node `yaml:"secrets,omitempty"`
|
||||
Oauth yaml.Node `yaml:"oauth,omitempty"`
|
||||
Sources []string `yaml:"sources"`
|
||||
Environment map[string]string `yaml:"environment"`
|
||||
|
||||
Rest map[string]yaml.Node `yaml:",inline"`
|
||||
}
|
||||
if err := yaml.NewDecoder(r).Decode(&manifest); err != nil {
|
||||
msg := fmt.Sprintf("could not decode manifest %q", pc.meta.ManifestPath)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue