1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2024-11-22 08:42:32 -05:00
forgejo/templates
6543 ff8f7a7a0d
Extend issue template yaml engine (#29274)
Add new option:

`visible`: witch can hide a specific field of the form or the created
content afterwards

It is a string array witch can contain `form` and `content`. If only
`form` is present, it wont show up in the created issue afterwards and
the other way around. By default it sets both except for markdown

As they are optional and github don't have any similar thing, it is non
breaking and also do not conflict with it.

With this you can:
- define "post issue creation" elements like a TODO list to track an
issue state
- make sure to have a checkbox that reminds the user to check for a
thing but dont have it in the created issue afterwards
- define markdown for the created issue (was the downside of using yaml
instead of md in the past)
 - ...

## Demo

```yaml
name: New Contribution
description: External Contributor creating a pull

body:
- type: checkboxes
  id: extern-todo
  visible: [form]
  attributes:
    label: Contribution Guidelines
    options:
      - label: I checked there exist no similar feature to be extended
        required: true
      - label: I did read the CONTRIBUTION.MD
        required: true
- type: checkboxes
  id: intern-todo
  visible: [content]
  attributes:
    label: Maintainer Check-List
    options:
      - label: Does this pull follow the KISS principe
      - label: Checked if internal bord was notifyed
# ....
```
[Demo
Video](https://cloud.obermui.de/s/tm34fSAbJp9qw9z/download/vid-20240220-152751.mkv)

---
*Sponsored by Kithara Software GmbH*

---------

Co-authored-by: John Olheiser <john.olheiser@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
(cherry picked from commit 77e29e0c39392f142627303bd798fb55258072b2)
2024-03-06 12:10:47 +08:00
..
admin Filter Repositories by type (#29231) 2024-03-06 12:10:46 +08:00
api/packages/pypi Remove incorrect HTML self close tag (#23748) 2023-03-27 18:05:51 +02:00
base Rename Str2html to SanitizeHTML and clarify its behavior (#29516) 2024-03-06 12:10:45 +08:00
code Remove incorrect and unnecessary Escape from templates (#29394) 2024-02-26 22:30:27 +01:00
custom [FEAT] Repository flags 2024-02-05 16:09:42 +01:00
devtest Use tailwind instead of gt-[wh]- helper classes (#29423) 2024-03-06 12:10:43 +08:00
explore Filter Repositories by type (#29231) 2024-03-06 12:10:46 +08:00
mail Breaking summary for template refactoring (#29395) 2024-03-06 12:10:46 +08:00
org Filter Repositories by type (#29231) 2024-03-06 12:10:46 +08:00
package Refactor some Str2html code (#29397) 2024-03-06 12:10:44 +08:00
projects Refactor some Str2html code (#29397) 2024-03-06 12:10:44 +08:00
repo Extend issue template yaml engine (#29274) 2024-03-06 12:10:47 +08:00
shared Filter Repositories by type (#29231) 2024-03-06 12:10:46 +08:00
status Rename Str2html to SanitizeHTML and clarify its behavior (followup) 2024-03-06 12:10:45 +08:00
swagger Extend issue template yaml engine (#29274) 2024-03-06 12:10:47 +08:00
user Filter Repositories by type (#29231) 2024-03-06 12:10:46 +08:00
webhook Change webhook-type in create-view (#29114) 2024-02-17 23:24:30 +01:00
home.tmpl Rename Str2html to SanitizeHTML and clarify its behavior (followup) 2024-03-06 12:10:45 +08:00
install.tmpl Remove unnecessary "Safe" modifier from templates (#29318) 2024-02-26 22:30:26 +01:00
post-install.tmpl [BRANDING] Custom loading animation for Forgejo 2024-02-05 16:02:13 +01:00