Open lurch opened 6 years ago
Also, following on from comments by @sqweelygig , maybe it'd make sense to apply default values to some of these parameters if no value is explicitly set?
schema
could default to schema.yaml
, contentPath
could default to content
, file
could default to document.yaml
, and ref
could default to master
; leaving the only required-params as account
and name
. Connects to #241
Hmmm, and I've just spotted that ref
is documented as The name of the commit/branch/tag. usually the repository’s default branch (eg master)
- if a commit or tag is used here, how does the Save-changes work in Pensieve? Would it effectively become readonly?
And interestingly, since I'm hosting my static index.html page (the /docs directory of https://github.com/resin-io/integration-ecosystem) via github pages the account
and name
are also present in the window.location
of https://resin-io.github.io/integration-ecosystem/index.html
A no-config Pensieve would be a very sweet thing indeed ;)
And in an effort to minimise the amount of config needed, maybe if the index.html
doesn't set a <title>
tag, that could also be set automatically from the repo's name?
Only a minor issue, but it seems a bit weird that in the
index.html
setupschema
is scoped at the 'top level' butfile
is scoped inside therepo
object?schema
andfile
are both files in the same repo, so they should probably be scoped similarly? And also, given how tightly-coupled thecontentPath
andfile
attributes are, it also seems odd that these are scoped differently?Perhaps the easiest way to fix both these points would be to move
file
outside of therepo
object, so thatrepo
only specifiesname
,account
andref
? Also, it might make sense to showaccount
beforename
in the example, as GitHub URLs always have the account (user) before the name (repo)?