feat: recipe generate: load category and features #137
Manually merged
coop-cloud
merged 0 commits from 2021-11-22 18:34:05 +00:00
catalogue-metadata into main
Labels
Clear labels
bug
build
ci/cd
critical fix
design
documentation
duplicate
easy-first-issue
enhancement
help wanted
i10n
i18n
installer
invalid
question
release
release-candidate
security
tech-debt
test
wontfix
Something is not working
go build related issues
Building things with CI/CD
https://docs.coopcloud.tech/federation/resolutions/passed/010/
UI/UX
Documenting all the things
This issue or pull request already exists
Something for new people to get stuck into. We hope it's easy!
New feature
Need some help
Everything to do with localisation
Everything to do with internationalisation
Everything to do with the install script.
Something is wrong
More information is needed
Release management
Related to the new release candidate
Security related
Unit/integration testing
This won't be fixed
No labels
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Assignees
3wordchant
aadil (Aadil Ayub)
abra-bot (Abra Bot)
ammaratef45
amras (Sarma)
Apfelwurm
BornDeleuze
Brooke
carla
cas (Cassowary)
coopcloud
cyrnel
decentral1se (d1)
dede
devydave
fauno (fauno)
iexos
jade (Jade Ambrose)
jjsfunhouse
jmakdah2 (Jackie Makdah)
joe-irving (Joe Irving)
kawaiipunk (KawaiiPunk)
knoflook
kolaente
lambdabundesverband
linnealovespie (April)
moosemower
moritz
notplants
oxaliq (sorrel)
p4u1
pharaohgraphy (Andrew 🐦🔥❤️🔥✴️)
renovate-bot (Comrade Renovate Bot)
ripclap
simon
sixsmith (Sixsmith)
stevensting
trav (Trav Fryer)
val (val (he/him))
yksflip
Clear assignees
No Assignees
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: toolshed/abra#137
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
This (jankily) loads metadata from recipe README files to populate the
categoryandfeaturessections.Parsing
statusis not implemented yet, because I want to clean up how the scores are represented in the READMEs themselves first.This runs fine on several recipes.
@roxxers any tips on making the code less repetitive and more elegant? I have no real idea what I'm doing here :P
One problem is that I'm having trouble authenticating with Docker Hub to fetch manifests, for recipes that have tags:
04c6e4a30atoe0fefd9fc6🔥 G R E A T 🔥
@@ -133,1 +133,4 @@isClean, err := gitPkg.IsClean(rm.Name)if err != nil {returnlogrus.Fatal(err)@@ -162,6 +171,8 @@ A new catalogue copy can be published to the recipes repository by passing thelogrus.Fatal(err)}features, category, err := catalogue.GetRecipeFeaturesAndCategory(recipeMeta.Name)missing
if err != nil ...dance for thiserr?@@ -374,6 +375,116 @@ func ReadReposMetadata() (RepoCatalogue, error) {return reposMeta, nil}func GetStringInBetween(str string, start string, end string) (result string) {can do
str, start, end stringas they're all typestringalso you can make the return
(result string, err error)and then if you have success doreturn str..., nilor if you have a failure doreturn str/"", fmt.Errorf(...)where it doesn't matter whatstris becauseerr != nilon the caller side.@@ -377,0 +399,4 @@}if len(imgFields) < 3 {logrus.Warnf("Image string has incorrect format: %s", imageRowString)fyi most logging is all lowercase in the codebase for some reason idk
This is go formattings work. all logs should start with lowercase. I mean its a style thing and I don't know why it wants that but might as well keep the style going. Plus I personally think it looks nice.
Thanks @decentral1se @roxxers! Made those changes, anything else?
e602c70beato711c4e5ee8