Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.yml (YAML) Issue Templates #20232

Closed
C-EO opened this issue Jul 4, 2022 · 13 comments
Closed

.yml (YAML) Issue Templates #20232

C-EO opened this issue Jul 4, 2022 · 13 comments
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Milestone

Comments

@C-EO
Copy link

C-EO commented Jul 4, 2022

Feature Description

I think it would be great if Gitea had issue template customization using YAML.

This would mimic the Github YAML Issue Templates, but also give the user more control over the template customization that Markdown can't.

Screenshots

No response

@C-EO C-EO added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Jul 4, 2022
@jolheiser
Copy link
Member

Do you mean the new issue template forms GH has?

@C-EO
Copy link
Author

C-EO commented Jul 5, 2022

@jolheiser Yes, I mean the new issue template forms.
I think it would be a great addition to Gitea 1.18 or so

@Wazzaps
Copy link

Wazzaps commented Aug 7, 2022

I might work on this on the weekend, I would like to discuss some implementation details:

  1. Should I just implement the GitHub syntax ? (Sounds like the best plan)
  2. Also support github's path for these templates (.github/ISSUE_TEMPLATE)? This mirrors the behavior of Markdown templates.
  3. Should we provide an API/webhook for extracting the fields as JSON for CI/CD purposes? In my org we used (an internal) Jira Service Desk to trigger a build using customer-specified parameters.
    3.a. Could it be queried after the issue has been created? What if it's edited? Do we parse the markdown?

EDIT:
   4. How will we handle file uploads? Add a type=upload? or maybe allow uploads on all markdown fields?

@FatCatTuxedo
Copy link

What I would love is the ability to generate an actual form like github provides:
image

@Wazzaps
Copy link

Wazzaps commented Aug 11, 2022

This is exactly what I want to work on :)

@eeyrjmr
Copy link
Contributor

eeyrjmr commented Aug 11, 2022

  1. Should I just implement the GitHub syntax ? (Sounds like the best plan)
  2. Also support github's path for these templates (.github/ISSUE_TEMPLATE)? This mirrors the behavior of Markdown templates.

At the very least matching syntax and locations provides means to migrate. Whether it is expanded upon ....

@Wazzaps
Copy link

Wazzaps commented Aug 12, 2022

An initial screenshot, going to need a designer for this later :)
(don't mind the xss labels, just making sure)

2022-08-12 18 54 02 localhost cb2d5a903bfc

I'll work on the API endpoint and then submit a draft PR

@lunny
Copy link
Member

lunny commented Aug 12, 2022

An initial screenshot, going to need a designer for this later :) (don't mind the xss labels, just making sure)

2022-08-12 18 54 02 localhost cb2d5a903bfc

I'll work on the API endpoint and then submit a draft PR

Hm, I also plan to implement it but for pull request. I'm glad to review the PR and provide any service for that. I would like to extend GH's syntax to support more validations.

@delvh
Copy link
Member

delvh commented Aug 12, 2022

By the way, this issue is a duplicate of #16353.
Considering that you're already developing for this issue, I guess I can close the other issue after pasting the relevant content here as well:


Description

As shown in #16349, GitHub now supports issue forms for a unified issue creation behavior.
It would be great and pretty user friendly, if Gitea would support the same.
Syntactically, it would be good, if a GitHub-similar syntax would be chosen (see the example currently integrated into Gitea itself or the GitHub syntax documentation), with the same structure as GitHub as well.

Included features

  • Issue Builder with basically all components that GitHub supports as well
  • config.yml in the template folder to change the configuration of the issue and PR templates
  • Automated Issue template updating when the template folder has been updated

Potential to be better than GitHub (Later on)

  • Localized text (i.e. so that comments can be displayed in the native language with English as fallback - i.e. by having a locale_<Locale>.ini in the template folder)
  • Ability to refer to a mail account in the clickable_links: section of the config.yml
  • Do not show optional columns where no text has been entered

Predicted Problems

  • Feature will be pretty big (I estimate ~2000-4000 lines of code)
  • How to handle issue/ PR creation over API (especially when blank_issues_enabled: false is part of the config.yml)

Screenshots

image
Current issue creation form displayed on GitHub when creating a new bug report for Gitea

image
Current representation for an issue created using issue forms

@lunny
Copy link
Member

lunny commented Aug 12, 2022

By the way, this issue is a duplicate of #16353. Considering that you're already developing for this issue, I guess I can close the other issue after pasting the relevant content here as well:

Description

As shown in #16349, GitHub now supports issue forms for a unified issue creation behavior. It would be great and pretty user friendly, if Gitea would support the same. Syntactically, it would be good, if a GitHub-similar syntax would be chosen (see the example currently integrated into Gitea itself or the GitHub syntax documentation), with the same structure as GitHub as well.

Included features

  • Issue Builder with basically all components that GitHub supports as well
  • config.yml in the template folder to change the configuration of the issue and PR templates
  • Automated Issue template updating when the template folder has been updated

Potential to be better than GitHub (Later on)

  • Localized text (i.e. so that comments can be displayed in the native language with English as fallback - i.e. by having a locale_<Locale>.ini in the template folder)
  • Ability to refer to a mail account in the clickable_links: section of the config.yml
  • Do not show optional columns where no text has been entered

Predicted Problems

  • Feature will be pretty big (I estimate ~2000-4000 lines of code)
  • How to handle issue/ PR creation over API (especially when blank_issues_enabled: false is part of the config.yml)

Screenshots

image Current issue creation form displayed on GitHub when creating a new bug report for Gitea

image Current representation for an issue created using issue forms

Sorry @delvh I think your issue is very helpful.

@Wazzaps
Copy link

Wazzaps commented Aug 12, 2022

It is indeed, I did not think of most of the problems @delvh presented

@lunny lunny added this to the 1.18.0 milestone Aug 27, 2022
@qwerty287
Copy link
Contributor

Is this implemented? #20987 is merged, but this is not closed.

@delvh
Copy link
Member

delvh commented Sep 4, 2022

I think it is, and the unimplemented aspects should probably be extracted into another (summary?) issue.

@delvh delvh closed this as completed Sep 4, 2022
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

8 participants