mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Updates to the API for archived repos (#27149)
This commit is contained in:
@@ -65,6 +65,11 @@ type RepoFileOptions struct {
|
||||
|
||||
// ChangeRepoFiles adds, updates or removes multiple files in the given repository
|
||||
func ChangeRepoFiles(ctx context.Context, repo *repo_model.Repository, doer *user_model.User, opts *ChangeRepoFilesOptions) (*structs.FilesResponse, error) {
|
||||
err := repo.MustNotBeArchived()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// If no branch name is set, assume default branch
|
||||
if opts.OldBranch == "" {
|
||||
opts.OldBranch = repo.DefaultBranch
|
||||
|
Reference in New Issue
Block a user