Gitea: Template Repository

Created on 22 Nov 2019  路  11Comments  路  Source: go-gitea/gitea

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:

  • [x] Git Content #8768
  • [x] Topics #8768
  • [x] Git Hooks #8926
  • [x] Webhooks #8926
  • [x] Avatar #9149
  • [x] Issue Labels #9149
  • [x] [Auto-Expand](https://golang.org/pkg/os/#Expand) specified variables 1 2 #9163 #10021

Implemented after 1.11.0/unknown:

  • [ ] Wiki
  • [ ] Issues/PRs (in my opinion these shouldn't be part of a template generation)
  • [ ] Teams, contributors if new repo owner == template owner.
  • [ ] Branches/Protection Rules 1
  • [ ] Repo permissions
  • [ ] Squash the commits. When create a repository from a template repository. We may want to squash all the commits on the template repository as one commit may has a default commit log init project. And the author and committer is the repository creator. (hesitation)
  • [ ] API support

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

kinfeature stale

Most helpful comment

Mm.... This calls for a voting system embedded in Gitea. 馃 馃榿

All 11 comments

Mm.... This calls for a voting system embedded in Gitea. 馃 馃榿

Are all branches of the git repository moved?

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.

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

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

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

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.

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

@joshbalfour Could you fire a bug issue?

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.

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

Was this page helpful?
0 / 5 - 0 ratings