1
1
mirror of https://github.com/go-gitea/gitea synced 2024-06-25 04:35:48 +00:00
gitea/templates/repo/issue
6543 77e29e0c39
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>
2024-03-04 01:37:00 +01:00
..
fields Extend issue template yaml engine (#29274) 2024-03-04 01:37:00 +01:00
labels Remove unnecessary "Str2html" modifier from templates (#29319) 2024-02-22 18:05:47 +00:00
milestone Improve the list header in milestone page (#27302) 2023-10-18 00:03:42 +00:00
view_content Refactor the "attachments" sub-template data key to RenderedContent (#29517) 2024-03-01 10:56:29 +00:00
branch_selector_field.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
card.tmpl Use tailwind instead of gt-[wh]- helper classes (#29423) 2024-02-27 14:31:41 +00:00
choose.tmpl Remove RenderEmojiPlain from template helper (#29375) 2024-02-24 22:34:51 +00:00
comment_tab.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
filter_actions.tmpl Hide archived labels by default from the suggestions when assigning labels for an issue (#27451) 2023-10-17 16:10:45 +02:00
filter_list.tmpl Remove unnecessary "Safe" modifier from templates (#29318) 2024-02-22 17:02:33 +00:00
filters.tmpl Refactor template empty checks (#28351) 2023-12-04 15:48:42 -06:00
label_precolors.tmpl Refactor some CSS styles and simplify code (#26771) 2023-08-28 22:14:51 +08:00
labels.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
list.tmpl Show total TrackedTime on issue/pull/milestone lists (#26672) 2023-10-19 14:08:31 +00:00
milestone_issues.tmpl Refactor some Str2html code (#29397) 2024-03-01 07:11:51 +00:00
milestone_new.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
milestones.tmpl Refactor some Str2html code (#29397) 2024-03-01 07:11:51 +00:00
navbar.tmpl Always use ctx.Locale.Tr inside templates (#27231) 2023-09-25 08:56:50 +00:00
new_form.tmpl Fix incorrect redirection when creating a PR fails (#29537) 2024-03-02 12:45:14 +00:00
new.tmpl Fix incorrect redirection when creating a PR fails (#29537) 2024-03-02 12:45:14 +00:00
openclose.tmpl Add ability to see open and closed issues at the same time (#28757) 2024-01-15 15:07:22 +00:00
search.tmpl Improve the list header in milestone page (#27302) 2023-10-18 00:03:42 +00:00
view_content.tmpl Refactor the "attachments" sub-template data key to RenderedContent (#29517) 2024-03-01 10:56:29 +00:00
view_title.tmpl Remove incorrect and unnecessary Escape from templates (#29394) 2024-02-25 14:02:20 +00:00
view.tmpl Make Issue/PR/projects more compact, misc CSS tweaks (#24459) 2023-05-03 17:58:59 -04:00