From 40229a7dd8edc0f07fb1982c0912fdf4df083871 Mon Sep 17 00:00:00 2001 From: Gary Moon Date: Tue, 15 Nov 2022 15:22:16 -0500 Subject: [PATCH 1/2] Skip GitHub migration tests if the API token is undefined (#21824) GitHub migration tests will be skipped if the secret for the GitHub API token hasn't been set. This change should make all tests pass (or skip in the case of this one) for anyone running the pipeline on their own infrastructure without further action on their part. Resolves https://github.com/go-gitea/gitea/issues/21739 Signed-off-by: Gary Moon --- services/migrations/github_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/services/migrations/github_test.go b/services/migrations/github_test.go index 90c1fcaef5..7bbbbb6168 100644 --- a/services/migrations/github_test.go +++ b/services/migrations/github_test.go @@ -18,7 +18,11 @@ import ( func TestGitHubDownloadRepo(t *testing.T) { GithubLimitRateRemaining = 3 // Wait at 3 remaining since we could have 3 CI in // - downloader := NewGithubDownloaderV3(context.Background(), "https://github.com", "", "", os.Getenv("GITHUB_READ_TOKEN"), "go-gitea", "test_repo") + token := os.Getenv("GITHUB_READ_TOKEN") + if token == "" { + t.Skip("Skipping GitHub migration test because GITHUB_READ_TOKEN is empty") + } + downloader := NewGithubDownloaderV3(context.Background(), "https://github.com", "", "", token, "go-gitea", "test_repo") err := downloader.RefreshRate() assert.NoError(t, err) From f311d15a0ba6e4864d7e5dea83364f93e8eadca4 Mon Sep 17 00:00:00 2001 From: May Date: Tue, 15 Nov 2022 22:36:53 +0100 Subject: [PATCH 2/2] Added space between avatar and username (#21825) Added space between avatar and username which is missing on verified commit message and avatar is too close to username which is don't look nice. Current state ![image](https://user-images.githubusercontent.com/3164256/202007728-d7d6ecac-f754-454c-a67f-e422f4aac5a5.png) This is how it looks after change ![image](https://user-images.githubusercontent.com/3164256/202007984-d4a38a1c-7c24-4278-aa0f-9aa51c10f772.png) Co-authored-by: zeripath Co-authored-by: silverwind Co-authored-by: techknowlogick --- templates/repo/commit_page.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/repo/commit_page.tmpl b/templates/repo/commit_page.tmpl index 8ece768832..2dcd02ad98 100644 --- a/templates/repo/commit_page.tmpl +++ b/templates/repo/commit_page.tmpl @@ -200,7 +200,7 @@ {{else}} {{.locale.Tr "repo.commits.signed_by_untrusted_user_unmatched"}}: {{end}} - {{avatar .Verification.SigningUser 28}} + {{avatar .Verification.SigningUser 28 "mr-3"}} {{.Verification.SigningUser.GetDisplayName}} {{else}} {{svg "gitea-lock-cog" 16 "mr-3"}}