]> source.dussan.org Git - gitea.git/commitdiff
Fix PushEvent NullPointerException jenkinsci/github-plugin (#27203)
authorNabapadma-sarker <nabapadmacse1991@gmail.com>
Sun, 24 Sep 2023 19:02:47 +0000 (04:02 +0900)
committerGitHub <noreply@github.com>
Sun, 24 Sep 2023 19:02:47 +0000 (19:02 +0000)
Fixes #27202

modules/structs/repo.go
services/convert/repository.go
templates/swagger/v1_json.tmpl

index 6a2ba4836bb931e2cda75453b3d8302fc2e4dbf6..3974c4db3ab1c55bd1f8322b10131279dce14e82 100644 (file)
@@ -63,6 +63,7 @@ type Repository struct {
        Language      string      `json:"language"`
        LanguagesURL  string      `json:"languages_url"`
        HTMLURL       string      `json:"html_url"`
+       URL           string      `json:"url"`
        Link          string      `json:"link"`
        SSHURL        string      `json:"ssh_url"`
        CloneURL      string      `json:"clone_url"`
index 6f77b4932e4feb9c462ca1eea3a48f73c1cb756c..71038cd0629cbf05afb5138e44550d75abac70f5 100644 (file)
@@ -181,6 +181,7 @@ func innerToRepo(ctx context.Context, repo *repo_model.Repository, permissionInR
                Parent:                        parent,
                Mirror:                        repo.IsMirror,
                HTMLURL:                       repo.HTMLURL(),
+               URL:                           repoAPIURL,
                SSHURL:                        cloneLink.SSH,
                CloneURL:                      cloneLink.HTTPS,
                OriginalURL:                   repo.SanitizedOriginalURL(),
index a9a69bc82a9eadb0a5f0d9165e7890f1f51d526f..abe579ac826c1aa4d0d4e2b7f3a3504975b4e590 100644 (file)
           "format": "date-time",
           "x-go-name": "Updated"
         },
+        "url": {
+          "type": "string",
+          "x-go-name": "URL"
+        },
         "watchers_count": {
           "type": "integer",
           "format": "int64",