Skip to content

Add static hosted HTML page with PR builder forms #968

Open
@bollwyvl

Description

@bollwyvl

Comment:

elevator pitch

Provide a low-barrier way to make precise, pre-validated admin requests.

motivation

After looking at the GH PR templates feature (suggested in #535), I was unsatisfied with the specificity of the language (as usual, not quite JSON schema),

design ideas

So I wrote a thing that:

  • takes in JSON schema
  • builds a form with rjsf
  • makes a yaml/json/toml of the form
  • makes a link for new PR based on the input, which can include exactly on file

Here's a demo for an outrageously long schema:

https://deathbeds.github.io/jupyak/shaver.html

challenges

The downside: to get the nice UI (dropdown/autocomplete), all the feedstock names would need to be embedded in the schema, e.g.

"feedstocks": {
  "type": "array",
  "items": {
     "type": "string",
     "enum": ["aalto-boss", "a-few-others", "zziplib"]
  }
}

But this might be something that could be generated in one place...

{
  "$id": "https://conda-forge.org/schema/feedstocks.schema.json",
  "type": "string",
  "enum": ["aalto-boss", "a-few-others", "zziplib"]
}

And then referenced here:

{
  "feedstocks": {
    "type": "array",
    "items": {
      "$ref": "https://conda-forge.org/schema/feedstocks.schema.json"
    }
  }
}

implementation ideas

After the... experience... with pydantic over on conda-smithy, it seems like schema-first design (but perhaps authored in YAML) to get to a well-typed TypedDict might be easier and give strictly better validation.

alternatives

  • use the semi-decent Issue form to generate PRs
    • the specification language is also not-quite-schema, and not portable to anything else
    • an action would have to re-parse the generated markdown
    • the generated PR is not editable by the original owner with more complexity
  • use a bot pidgin grammar
    • these are harder to discover, and don't have autocomplete (other than the bot name)

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions