]> source.dussan.org Git - gitea.git/commitdiff
Fix PushEvent NullPointerException jenkinsci/github-plugin (#27203) (#27249)
authorGiteabot <teabot@gitea.io>
Mon, 25 Sep 2023 07:02:08 +0000 (15:02 +0800)
committerGitHub <noreply@github.com>
Mon, 25 Sep 2023 07:02:08 +0000 (07:02 +0000)
Backport #27203 by @Nabapadma-sarker

Fixes #27202

Co-authored-by: Nabapadma-sarker <nabapadmacse1991@gmail.com>
modules/structs/repo.go
services/convert/repository.go
templates/swagger/v1_json.tmpl

index 159ba76cec79036de22a335fc2ce94bc9901b27f..a131646fc0f18eb9bdaa32d2434d7e60cb9afe95 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 6bedcfd4f0066c7aaea4c83441fc3ffb5d195c84..370bed2b248504a3700136ea62e54f6cdd16d7b9 100644 (file)
           "format": "date-time",
           "x-go-name": "Updated"
         },
+        "url": {
+          "type": "string",
+          "x-go-name": "URL"
+        },
         "watchers_count": {
           "type": "integer",
           "format": "int64",