conda-forge / conda-forge/admin-requests
Add static hosted HTML page with PR builder forms
- Langage dominant
- Python
- Étoiles
- 39
- Forks
- 541
- Merge moyen
- 2 j 7 h
- PR mergées (30 j)
- 65
Description
### 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](https://github.com/deathbeds/jupyak/tree/main/js/demo) that:
- takes in JSON schema
- builds a form with [rjsf](https://rjsf-team.github.io/react-jsonschema-form/)
- 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.
```yaml
"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...
```yaml
{
"$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`](https://github.com/sbrunner/jsonschema-gentypes) might be easier and give strictly better validation.
## alternatives
- use the semi-decent [Issue form](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-issue-forms) 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)
Guide de contribution
Ouvrir le guide de contribution
Évaluation
Cette issue n'a pas encore été évaluée.