forgejo-contrib-forgejo-cli-issues-227.md
Watch20
Star402
Fork
You've already forked forgejo-cli
CodeIssues 44Pull requests 8Releases 11Packages 2WikiActivity
Closed
opened 2025-10-19 18:19:06 +02:00 by Cyborus · 3 comments
Cyborus commented 2025-10-19 18:19:06 +02:00
Member
Copy link
Repos can have templates for issues in .forgejo/issue_template/*.{md,yml,yaml} and for pull requests in .forgejo/pull_request_template.{md,yml,yaml}. Supporting this can be important as it can be a big help to keeping projects organized
Forgejo docs page on the subject
Markdown templates seem quite easy to add; parse the front matter for labels and such, and include the template body when opening the editor. Not sure how to handle the title field though
YAML templates seem like a much more significant design challenge, since having multiple entry fields doesn't map clearly to editing in a text editor.
I've had a couple ideas for this:
<!-- like this -->, and validating the result. So far, this is what I'm preferringcargo generate, that would interactively get each field from the user (i.e. multiple choice list in place of dropdowns, opening the editor for markdown sections). This sounds nice, but it would be strange to only have this one interactive command. I wouldn't want it to be the only option. Maybe as part of a later --interactive feature?Repos can have templates for issues in .forgejo/issue_template/*.{md,yml,yaml} and for pull requests in .forgejo/pull_request_template.{md,yml,yaml}. Supporting this can be important as it can be a big help to keeping projects organized Forgejo docs page on the subject Markdown templates seem quite easy to add; parse the front matter for labels and such, and include the template body when opening the editor. Not sure how to handle the title field though YAML templates seem like a much more significant design challenge, since having multiple entry fields doesn't map clearly to editing in a text editor. I've had a couple ideas for this: - Render it to markdown, including the attribute descriptions as html comments \<!-- like this --\>, and validating the result. So far, this is what I'm preferring - Open the editor multiple times, once for each field. Seems unwieldy - Something resembling cargo generate, that would interactively get each field from the user (i.e. multiple choice list in place of dropdowns, opening the editor for markdown sections). This sounds nice, but it would be strange to only have this one interactive command. I wouldn't want it to be the only option. Maybe as part of a later --interactive feature?
Cyborus added the Kind/Feature label 2025-10-19 18:19:06 +02:00
mahlzahn commented 2025-10-19 18:57:27 +02:00
Copy link
@Cyborus wrote in #227 (comment):
- Render it to markdown, including the attribute descriptions as html comments
<!-- like this -->, and validating the result. So far, this is what I'm preferring
Doing it the git commit message style, when interactively editing, with commented lines ignored could be an option, too.
@Cyborus wrote in https://codeberg.org/forgejo-contrib/forgejo-cli/issues/227#issue-2535794: > * Render it to markdown, including the attribute descriptions as html comments \<!-- like this --\>, and validating the result. So far, this is what I'm preferring Doing it the git commit message style, when interactively editing, with commented lines ignored could be an option, too.
Cyborus commented 2025-10-19 19:47:16 +02:00
Author
Member
Copy link
Unfortunately # -style comments would conflict with markdown headers. HTML comments seem supported by syntax highlighters (mine does at least) and would be pretty easy to strip since comrak (markdown library fj uses) detects them as inline HTML
Unfortunately # -style comments would conflict with markdown headers. HTML comments seem supported by syntax highlighters (mine does at least) and would be pretty easy to strip since comrak (markdown library fj uses) detects them as inline HTML
Cyborus commented 2025-11-07 23:07:41 +01:00
Author
Member
Copy link
For YAML templates, I've had the thought of accepting markdown input inside a block quote, which would look something like this, using forgejo's bug report template as an example
**NOTE: If your issue is a security concern, please email <[email protected]> ([security.txt](https://forgejo.org/.well-known/security.txt)) instead of opening a public issue.**
- Please speak English, as this is the language all maintainers can speak and write.
- Be as clear and concise as possible. A very verbose report is harder to interpret in a concrete way.
- Be civil, and follow the [Forgejo Code of Conduct](https://codeberg.org/forgejo/code-of-conduct).
- Take a moment to [check that your issue hasn't been reported before](https://codeberg.org/forgejo/forgejo/issues?q=&type=all&labels=78137).
## Can you reproduce the bug on the Forgejo test instance?
Please try reproducing your issue at https://dev.next.forgejo.org.
It is running the latest development branch and will confirm the problem is not already fixed.
If you can reproduce it, provide a URL in the description.
- [] Yes, I've linked the repository below
- [] No, I've tried it and the problem is not present there
- [] No, I can't try it on the test instance for some reason
## Description
Please provide a description of your issue here, with a URL if you were able to reproduce the issue (see above).
If you think this is a JavaScript error, include a copy of the JavaScript console.
> This is where the author of the issue would put their text.
> Any modifications outside of the expected areas would be rejected. The markdown library I'm using returns a tree structure of the parsed file so it shouldn't be too difficult to validate it.
> It might be worth having something towards the top of the file that explains this, though.
## Screenshots
Please provide at least one screenshot showing the issue.
> I'm realizing there needs to be a way to attach files when creating issues, too.
# Forgejo Version
Forgejo version (or commit reference) your instance is running
> Codeberg
## Browser Version
The browser and version that you are using to access Forgejo
> forgejo-contrib/forgejo-cli v0.4.0-dev
I think this would be nicer to use than the HTML comments, since this allows the template text to be highlighted by the text editor. An alternative would be to put the text fields in an md codeblock, which would be easier to use in text editors that don't automatically add > to new lines, though I don't know how big of a deal that is.
I'm going to try implementing this design, though that doesn't necessarily mean it's final. New ideas still welcome, the implementation can be changed!
For YAML templates, I've had the thought of accepting markdown input inside a block quote, which would look something like this, using forgejo's bug report template as an example md **NOTE: If your issue is a security concern, please email \<[email protected]\> ([security.txt](https://forgejo.org/.well-known/security.txt)) instead of opening a public issue.** - Please speak English, as this is the language all maintainers can speak and write. - Be as clear and concise as possible. A very verbose report is harder to interpret in a concrete way. - Be civil, and follow the [Forgejo Code of Conduct](https://codeberg.org/forgejo/code-of-conduct). - Take a moment to [check that your issue hasn't been reported before](https://codeberg.org/forgejo/forgejo/issues?q=&type=all&labels=78137). ## Can you reproduce the bug on the Forgejo test instance? Please try reproducing your issue at https://dev.next.forgejo.org. It is running the latest development branch and will confirm the problem is not already fixed. If you can reproduce it, provide a URL in the description. - [] Yes, I've linked the repository below - [] No, I've tried it and the problem is not present there - [] No, I can't try it on the test instance for some reason ## Description Please provide a description of your issue here, with a URL if you were able to reproduce the issue (see above). If you think this is a JavaScript error, include a copy of the JavaScript console. \> This is where the author of the issue would put their text. \> Any modifications outside of the expected areas would be rejected. The markdown library I'm using returns a tree structure of the parsed file so it shouldn't be too difficult to validate it. \> It might be worth having something towards the top of the file that explains this, though. ## Screenshots Please provide at least one screenshot showing the issue. \> I'm realizing there needs to be a way to attach files when creating issues, too. # Forgejo Version Forgejo version (or commit reference) your instance is running \> Codeberg ## Browser Version The browser and version that you are using to access Forgejo \> forgejo-contrib/forgejo-cli v0.4.0-dev I think this would be nicer to use than the HTML comments, since this allows the template text to be highlighted by the text editor. An alternative would be to put the text fields in an md codeblock, which would be easier to use in text editors that don't automatically add \> to new lines, though I don't know how big of a deal that is. I'm going to try implementing this design, though that doesn't necessarily mean it's final. New ideas still welcome, the implementation can be changed!
Cyborus self-assigned this 2025-11-29 18:37:53 +01:00
Cyborus added this to the v0.4.0 milestone 2025-12-01 17:00:23 +01:00
Cyborus referenced this issue 2025-12-03 22:49:54 +01:00
Better UI for fj pr create #244
Cyborus referenced this issue 2026-01-10 02:12:29 +01:00 feat: issue & pr templates #261
Cyborus closed this issue 2026-01-14 17:06:05 +01:00
Sign in to join this conversation.
No Branch/Tag specified
main
renovate/lock-file-maintenance
renovate/serde-saphyr-0.x
docs/contributing
no-port-in-refspec
login/v16.next.forgejo.org
crates-io-publish
0.5.x
compile-time-fluent
0.4.x
localization-alias-demo
api_url_field
v0.5.0
v0.4.1
v0.4.0
v0.3.0
v0.2.0
v0.1.1
v0.1.0
v0.0.4
v0.0.3
v0.0.2
v0.0.1
Labels
Clear labels[ Kind/Breaking Breaking change that won't be backward compatible
](#)[ Kind/Bug Something is not working
](#)[ Kind/Design Discussion about UI/UX design
](#)[ Kind/Documentation Documentation changes
](#)[ Kind/Enhancement Improve existing functionality
](#)[ Kind/Feature New functionality
](#)[ Kind/Security This is security issue
](#)[ Kind/Testing Issue or pull request related to testing
](#)[ Kind/Upstream This is an issue with upstream software (Forgejo) that is probably not our fault
](#)
[ Priority
Critical The priority is critical
](#)[ Priority
High The priority is high
](#)[ Priority
Low The priority is low
](#)[ Priority
Medium The priority is medium
](#)
[ Reviewed
Confirmed Issue has been confirmed
](#)[ Reviewed
Duplicate This issue or pull request already exists
](#)[ Reviewed
Invalid Invalid issue
](#)[ Reviewed
Won't Fix This issue won't be fixed
](#)
[ Status
Abandoned Somebody has started to work on this but abandoned work
](#)[ Status
Blocked Something is blocking this issue or pull request
](#)[ Status
Need More Info Feedback is required to reproduce issue or to continue work
](#)
[ Suspicious
](#)
No labels Kind/Breaking Kind/Bug Kind/Design Kind/Documentation Kind/Enhancement Kind/Feature Kind/Security Kind/Testing Kind/Upstream [ Priority
Critical ](/forgejo-contrib/forgejo-cli/issues?labels=173012) [ Priority
High ](/forgejo-contrib/forgejo-cli/issues?labels=173013) [ Priority
Low ](/forgejo-contrib/forgejo-cli/issues?labels=173015) [ Priority
Medium ](/forgejo-contrib/forgejo-cli/issues?labels=173014) [ Reviewed
Confirmed ](/forgejo-contrib/forgejo-cli/issues?labels=173007) [ Reviewed
Duplicate ](/forgejo-contrib/forgejo-cli/issues?labels=173005) [ Reviewed
Invalid ](/forgejo-contrib/forgejo-cli/issues?labels=173006) [ Reviewed
Won't Fix ](/forgejo-contrib/forgejo-cli/issues?labels=173008) [ Status
Abandoned ](/forgejo-contrib/forgejo-cli/issues?labels=173011) [ Status
Blocked ](/forgejo-contrib/forgejo-cli/issues?labels=173010) [ Status
Need More Info ](/forgejo-contrib/forgejo-cli/issues?labels=173009) Suspicious
Milestone
Clear milestone
No items
No milestone v0.4.0
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
Notifications Subscribe
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".
No due date set.
Dependencies
No dependencies set.
Reference
forgejo-contrib/forgejo-cli#227
WritePreview
Loading…
Add table
| Rows | | | Columns | |
CancelOK
Add a link
Url Description Hint: With a URL in your clipboard, you can paste directly into the editor to create a link.
CancelOK
CancelSave
Reference in a new issue
Repository
forgejo-contrib/forgejo-cli
Title
Body
Create issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
No Yes