go-gitea / gitea

Git with a cup of tea! Painless self-hosted all-in-one software development service, including Git hosting, code review, team collaboration, package registry and CI/CD
https://gitea.com
MIT License
44.88k stars 5.48k forks source link

Template Repository #9126

Open jolheiser opened 4 years ago

jolheiser commented 4 years ago

Continues #7365 with a new issue so I can more closely update the head description as things are implemented/changed.

Hopefully implemented by 1.11.0:

Implemented after 1.11.0/unknown:

Feel free to suggest more to add to this list, or changes to this list.

guillep2k commented 4 years ago

Mm.... This calls for a voting system embedded in Gitea. 🤔 😁

lunny commented 4 years ago

Are all branches of the git repository moved?

jolheiser commented 4 years ago

Are all branches of the git repository moved?

Currently only default branch is copied, although @guillep2k has proposed some use-cases I linked in the above list that might be beneficial.

dharmann commented 4 years ago

I'm trying to create a repo template. Is there some documentation explaining hot to do that? Thanks!

jolheiser commented 4 years ago

It is a setting in your repository. Keep in mind this feature is available only in 1.11+
template_settings

dharmann commented 4 years ago

It is a setting in your repository. Keep in mind this feature is available only in 1.11+ Thanks so much!

bmackinney commented 4 years ago

Instead of copying the parent project Issues/PR's, I'd find utility in defining default Issues in files, perhaps like .gitea/template_issues/01-initialize-project.md - to provide child projects with the same set of checklists to complete and decisions to discuss and document. These files could contain yaml or toml frontmatter for processing into issue variables, and markdown bodies for the initial description. Once templates copy branches, .gitea/template_PRs/01-begin-project.md could follow the same pattern but can include branch names in the frontmatter. Both directories could be excluded from the child project, like .gitea/template is.

joshbalfour commented 4 years ago

please don't forget to fire the push webhook when a repository is created from a template! just noticed that it's not atm

lunny commented 4 years ago

@joshbalfour Could you fire a bug issue?

stale[bot] commented 4 years ago

This issue has been automatically marked as stale because it has not had recent activity. I am here to help clear issues left open even if solved or waiting for more insight. This issue will be closed if no further activity occurs during the next 2 weeks. If the issue is still valid just add a comment to keep it alive. Thank you for your contributions.

stale[bot] commented 4 years ago

This issue has been automatically closed because of inactivity. You can re-open it if needed.

chris-NR commented 3 years ago

A few additional suggestions:

clarfonthey commented 2 years ago

Something that I find useful that I haven't seen so far: it would be nice to be able to require custom variables on the template that the user has to fill out, which then get expanded in the .gitea/template files. For example, a repo may want to have both an identifier (${REPO_NAME}) and a proper "name" string which may contain spaces or other characters. Even if repo names could contain any character, this would still be desirable, imho.

twisted-nematic57 commented 1 year ago

I think it would also be great if it was possible to copy milestones and projects too, along with the wiki @jolheiser already suggested. (I created a template on my instance complete with project, milestone and template wiki, and was then disappointed I would have to copy it manually 😆)


Mm.... This calls for a voting system embedded in Gitea. thinking grin

@guillep2k I think the best way to implement that would be to make a Discussions tab in Gitea (just like there is in Github) and then make a "polls" section in that (again, just like Github). edited Screenshot from 2023-01-07 16-41-30

bendem commented 1 year ago

Would be great if you could select settings to be copied over when creating from a template.

We want our merge strategies to be consistent across repos, wiki and issues are external so we want this to be ported too. It's a bunch of checkboxes that have to be verified for every new repo.

Another solution is to make that configuration available at the org level. That what bitbucket does, it's great.

image

theAkito commented 1 year ago

Was about to suggest the same as @bendem did. I hoped, there'd be a global (or organisation wide - both would be great) default branch protection setting. For example, if I want the master branch to be protected, by default, so the repository owner has to specifically disable this to enable force pushes, etc.