mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	API expose usefull General Repo settings settings (#11758)
* GeneralRepoSettings expose MirrorsDisabled, HTTPGitDisabled, MaxCreationLimit * Apply suggestions from code review Co-authored-by: proton <25139420+proton-ab@users.noreply.github.com> * lint Co-authored-by: proton <25139420+proton-ab@users.noreply.github.com>
This commit is contained in:
		@@ -8487,6 +8487,23 @@
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "/settings/repository": {
 | 
			
		||||
      "get": {
 | 
			
		||||
        "produces": [
 | 
			
		||||
          "application/json"
 | 
			
		||||
        ],
 | 
			
		||||
        "tags": [
 | 
			
		||||
          "miscellaneous"
 | 
			
		||||
        ],
 | 
			
		||||
        "summary": "Get instance's global settings for repositories",
 | 
			
		||||
        "operationId": "getGeneralRepositorySettings",
 | 
			
		||||
        "responses": {
 | 
			
		||||
          "200": {
 | 
			
		||||
            "$ref": "#/responses/GeneralRepoSettings"
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "/signing-key.gpg": {
 | 
			
		||||
      "get": {
 | 
			
		||||
        "produces": [
 | 
			
		||||
@@ -12721,6 +12738,21 @@
 | 
			
		||||
      },
 | 
			
		||||
      "x-go-package": "code.gitea.io/gitea/modules/structs"
 | 
			
		||||
    },
 | 
			
		||||
    "GeneralRepoSettings": {
 | 
			
		||||
      "description": "GeneralRepoSettings contains global repository settings exposed by API",
 | 
			
		||||
      "type": "object",
 | 
			
		||||
      "properties": {
 | 
			
		||||
        "http_git_disabled": {
 | 
			
		||||
          "type": "boolean",
 | 
			
		||||
          "x-go-name": "HTTPGitDisabled"
 | 
			
		||||
        },
 | 
			
		||||
        "mirrors_disabled": {
 | 
			
		||||
          "type": "boolean",
 | 
			
		||||
          "x-go-name": "MirrorsDisabled"
 | 
			
		||||
        }
 | 
			
		||||
      },
 | 
			
		||||
      "x-go-package": "code.gitea.io/gitea/modules/structs"
 | 
			
		||||
    },
 | 
			
		||||
    "GitBlobResponse": {
 | 
			
		||||
      "description": "GitBlobResponse represents a git blob",
 | 
			
		||||
      "type": "object",
 | 
			
		||||
@@ -14890,6 +14922,12 @@
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "GeneralRepoSettings": {
 | 
			
		||||
      "description": "GeneralRepoSettings",
 | 
			
		||||
      "schema": {
 | 
			
		||||
        "$ref": "#/definitions/GeneralRepoSettings"
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    "GitBlobResponse": {
 | 
			
		||||
      "description": "GitBlobResponse",
 | 
			
		||||
      "schema": {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user