Skip to content

Commit 3fdc47a

Browse files
authored
Merge branch 'main' into deploy-keys-form
2 parents f13a467 + 70d8d64 commit 3fdc47a

File tree

23 files changed

+363
-347
lines changed

23 files changed

+363
-347
lines changed

.drone.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ steps:
534534

535535
- name: release-branch
536536
pull: always
537-
image: plugins/s3:1
537+
image: woodpeckerci/plugin-s3:latest
538538
settings:
539539
acl: public-read
540540
bucket: gitea-artifacts
@@ -555,7 +555,7 @@ steps:
555555
- push
556556

557557
- name: release-main
558-
image: plugins/s3:1
558+
image: woodpeckerci/plugin-s3:latest
559559
settings:
560560
acl: public-read
561561
bucket: gitea-artifacts
@@ -630,7 +630,7 @@ steps:
630630

631631
- name: release-tag
632632
pull: always
633-
image: plugins/s3:1
633+
image: woodpeckerci/plugin-s3:latest
634634
settings:
635635
acl: public-read
636636
bucket: gitea-artifacts

custom/conf/app.example.ini

+2
Original file line numberDiff line numberDiff line change
@@ -2043,6 +2043,8 @@ PATH =
20432043
;TOKEN =
20442044
;; Enable issue by label metrics; default is false
20452045
;ENABLED_ISSUE_BY_LABEL = false
2046+
;; Enable issue by repository metrics; default is false
2047+
;ENABLED_ISSUE_BY_REPOSITORY = false
20462048

20472049
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
20482050
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

docs/content/doc/advanced/config-cheat-sheet.en-us.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -853,7 +853,8 @@ NB: You must have `DISABLE_ROUTER_LOG` set to `false` for this option to take ef
853853
## Metrics (`metrics`)
854854

855855
- `ENABLED`: **false**: Enables /metrics endpoint for prometheus.
856-
- `ENABLED_ISSUE_BY_LABEL`: **false**: Enable issue by label metrics
856+
- `ENABLED_ISSUE_BY_LABEL`: **false**: Enable issue by label metrics with format `gitea_issues_by_label{label="bug"} 2`.
857+
- `ENABLED_ISSUE_BY_REPOSITORY`: **false**: Enable issue by repository metrics with format `gitea_issues_by_repository{repository="org/repo"} 5`.
857858
- `TOKEN`: **\<empty\>**: You need to specify the token, if you want to include in the authorization the metrics . The same token need to be used in prometheus parameters `bearer_token` or `bearer_token_file`.
858859

859860
## API (`api`)

integrations/user_avatar_test.go

+2-9
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import (
1111
"mime/multipart"
1212
"net/http"
1313
"net/url"
14-
"strings"
1514
"testing"
1615

1716
"code.gitea.io/gitea/models"
@@ -75,14 +74,8 @@ func TestUserAvatar(t *testing.T) {
7574
user2 = db.AssertExistsAndLoadBean(t, &models.User{ID: 2}).(*models.User) // owner of the repo3, is an org
7675

7776
req = NewRequest(t, "GET", user2.AvatarLink())
78-
resp := session.MakeRequest(t, req, http.StatusFound)
79-
location := resp.Header().Get("Location")
80-
if !strings.HasPrefix(location, "/avatars") {
81-
assert.Fail(t, "Avatar location is not local: %s", location)
82-
}
83-
req = NewRequest(t, "GET", location)
84-
session.MakeRequest(t, req, http.StatusOK)
77+
_ = session.MakeRequest(t, req, http.StatusOK)
8578

86-
// Can't test if the response matches because the image is regened on upload but checking that this at least doesn't give a 404 should be enough.
79+
// Can't test if the response matches because the image is re-generated on upload but checking that this at least doesn't give a 404 should be enough.
8780
})
8881
}

models/avatar.go

-148
This file was deleted.

0 commit comments

Comments
 (0)