conda-forge / conda-forge/admin-requests

Add static hosted HTML page with PR builder forms

オープン
#968 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る
question
主要言語
Python
スター
39
フォーク
541
平均マージ
2日 7時間
マージ済み PR(30日)
65

説明

### 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)

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。