Suggestion: Enhance file creation system to Include Templates from .github/templates Directory #132326
Unanswered
gameplays12303
asked this question in
Repositories
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description: I propose an enhancement to the GitHub repository create file feature. This enhancement would allow users to choose from user-created templates stored in .github/templates/[code_structure] directory when adding a new file. the system would use the same feature that the system would use when creating a LICENSE however The system would dynamically present template options based on the to be name of the file during creation
Use Case: Many projects benefit from having file templates for various purposes, such as code structures, configuration files, and documentation. This feature would streamline the process of creating new files with consistent formats and structures directly from the GitHub web interface.
Benefits:
---Consistency: Ensures that new files adhere to project standards and structures.
---Efficiency: Simplifies the process of creating new files, saving time for developers.
---User-Friendly: Integrates seamlessly into the existing GitHub "Add file" workflow, making it easier for contributors to find and use templates.
---No 3rd Paty Code: better security in general
Proposed Implementation:
---Template Storage: Users store templates in the .github/templates directory.
---Template Selection: When a user clicks "Add file" in a directory, they have an option to "Choose from templates."
---Dynamic Listing: The "Choose from templates" option lists templates relative to the current directory, showing relevant templates based on the user's location in the repository.
Example Usage:
---Store a template file at .github/templates/core/architecture/x86_64.template.md.
---When adding a file in the core/architecture directory, the user clicks "Add file" and selects "Choose from templates."
The available templates (e.g., x86_64.template.md) are listed, and the user selects one to create a new file based on the template.
Thank you for considering this request.
Beta Was this translation helpful? Give feedback.
All reactions