Merge pull request #1593 from aptly-dev/fix/repo-edit-name-optional

Fix/repo edit name optional
This commit is contained in:
André Roth
2026-06-19 13:01:14 +02:00
committed by GitHub
2 changed files with 3 additions and 4 deletions
+2 -3
View File
@@ -196,7 +196,7 @@ func apiReposCreate(c *gin.Context) {
type reposEditParams struct { type reposEditParams struct {
// Name of repository to modify // Name of repository to modify
Name *string `binding:"required" json:"Name" example:"repo1"` Name *string ` json:"Name" example:"new-repo-name"`
// Change Comment of repository // Change Comment of repository
Comment *string ` json:"Comment" example:"example repo"` Comment *string ` json:"Comment" example:"example repo"`
// Change Default Distribution for publishing // Change Default Distribution for publishing
@@ -208,7 +208,7 @@ type reposEditParams struct {
// @Summary Update Repository // @Summary Update Repository
// @Description **Update local repository meta information** // @Description **Update local repository meta information**
// @Tags Repos // @Tags Repos
// @Param name path string true "Repository name" // @Param name path string true "Repository name to modify"
// @Consume json // @Consume json
// @Param request body reposEditParams true "Parameters" // @Param request body reposEditParams true "Parameters"
// @Produce json // @Produce json
@@ -221,7 +221,6 @@ func apiReposEdit(c *gin.Context) {
if c.Bind(&b) != nil { if c.Bind(&b) != nil {
return return
} }
// Load shallowly for 404 check and resource key. // Load shallowly for 404 check and resource key.
// Mutation and duplicate check happen inside the task for atomicity. // Mutation and duplicate check happen inside the task for atomicity.
collectionFactory := context.NewCollectionFactory() collectionFactory := context.NewCollectionFactory()
+1 -1
View File
@@ -3,7 +3,7 @@ import tempfile
class TestOut: class TestOut:
def __init__(self): def __init__(self):
self.tmp_file = tempfile.NamedTemporaryFile(delete=False) self.tmp_file = tempfile.NamedTemporaryFile(delete=True)
self.read_pos = 0 self.read_pos = 0
def fileno(self): def fileno(self):