Propose-a-change: pick the file from the repo itself
target_path becomes a select whose options are the live listing of questions/ from Gitea's contents API (the engine's existing select-from-resource mechanism - no code change), with a free path field kept for proposals that create a new file. No more hand-typed, typo-able paths for existing pages. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
c1bd503efd
commit
1a88212bd9
@@ -31,11 +31,26 @@ alternatives:
|
||||
type: email
|
||||
optional: true
|
||||
- name: The change
|
||||
description: ""
|
||||
description: >
|
||||
Pick the page you're changing — or name a new file's path if
|
||||
the proposal creates one.
|
||||
requirements:
|
||||
- name: target_path
|
||||
label: File path
|
||||
label: The file to change
|
||||
type: select
|
||||
optional: true
|
||||
id_field: path
|
||||
resource:
|
||||
public: true
|
||||
source:
|
||||
kind: url
|
||||
url: https://project.uhhm.no/api/v1/repos/uhhm/questions/contents/questions?ref=main
|
||||
jq: >
|
||||
.[] | select(.type == "file") | {path: .path, name: .name}
|
||||
- name: new_path
|
||||
label: Or a new file's path
|
||||
placeholder: questions/example.yaml
|
||||
optional: true
|
||||
- name: rationale
|
||||
label: The rationale
|
||||
type: textarea
|
||||
|
||||
Reference in New Issue
Block a user