forked from go-gitea/gitea
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'giteaofficial/main'
* giteaofficial/main: (23 commits) Fix wrong test usage of `AppSubURL` (go-gitea#29459) Improve contrast on blame timestamp, fix double border (go-gitea#29482) Fix/Improve `processWindowErrorEvent` (go-gitea#29407) Apply compact padding to small buttons with svg icons (go-gitea#29471) Fix counter display number incorrectly displayed on the page (go-gitea#29448) Fix incorrect user location link on profile page (go-gitea#29474) Fix workflow trigger event bugs (go-gitea#29467) Fix URL calculation in clone input box (go-gitea#29470) Remove jQuery from the "find file" page (go-gitea#29456) Move generate from module to service (go-gitea#29465) The job should always run when `if` is `always()` (go-gitea#29464) Recolor dark theme to blue shade (go-gitea#29283) Let ctx.FormOptionalBool() return optional.Option[bool] (go-gitea#29461) Implement actions badge svgs (go-gitea#28102) Fix missed return (go-gitea#29450) Use tailwind instead of `gt-[wh]-` helper classes (go-gitea#29423) Lock issues and pulls faster (go-gitea#29436) Allow to change primary email before account activation (go-gitea#29412) Update docs about `DEFAULT_ACTIONS_URL` (go-gitea#29442) Only use supported sort order for "explore/users" page (go-gitea#29430) ...
- Loading branch information
Showing
405 changed files
with
1,249 additions
and
754 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
date: "2023-02-25T00:00:00+00:00" | ||
title: "Badge" | ||
slug: "badge" | ||
sidebar_position: 11 | ||
toc: false | ||
draft: false | ||
aliases: | ||
- /en-us/badge | ||
menu: | ||
sidebar: | ||
parent: "usage" | ||
name: "Badge" | ||
sidebar_position: 11 | ||
identifier: "Badge" | ||
--- | ||
|
||
# Badge | ||
|
||
Gitea has its builtin Badge system which allows you to display the status of your repository in other places. You can use the following badges: | ||
|
||
## Workflow Badge | ||
|
||
The Gitea Actions workflow badge is a badge that shows the status of the latest workflow run. | ||
It is designed to be compatible with [GitHub Actions workflow badge](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/adding-a-workflow-status-badge). | ||
|
||
You can use the following URL to get the badge: | ||
|
||
``` | ||
https://your-gitea-instance.com/{owner}/{repo}/actions/workflows/{workflow_file}?branch={branch}&event={event} | ||
``` | ||
|
||
- `{owner}`: The owner of the repository. | ||
- `{repo}`: The name of the repository. | ||
- `{workflow_file}`: The name of the workflow file. | ||
- `{branch}`: Optional. The branch of the workflow. Default to your repository's default branch. | ||
- `{event}`: Optional. The event of the workflow. Default to none. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,31 +45,22 @@ func TestIsEmailUsed(t *testing.T) { | |
func TestMakeEmailPrimary(t *testing.T) { | ||
assert.NoError(t, unittest.PrepareTestDatabase()) | ||
|
||
email := &user_model.EmailAddress{ | ||
Email: "[email protected]", | ||
} | ||
err := user_model.MakeEmailPrimary(db.DefaultContext, email) | ||
err := user_model.MakeActiveEmailPrimary(db.DefaultContext, 9999999) | ||
assert.Error(t, err) | ||
assert.EqualError(t, err, user_model.ErrEmailAddressNotExist{Email: email.Email}.Error()) | ||
assert.ErrorIs(t, err, user_model.ErrEmailAddressNotExist{}) | ||
|
||
email = &user_model.EmailAddress{ | ||
Email: "[email protected]", | ||
} | ||
err = user_model.MakeEmailPrimary(db.DefaultContext, email) | ||
email := unittest.AssertExistsAndLoadBean(t, &user_model.EmailAddress{Email: "[email protected]"}) | ||
err = user_model.MakeActiveEmailPrimary(db.DefaultContext, email.ID) | ||
assert.Error(t, err) | ||
assert.EqualError(t, err, user_model.ErrEmailNotActivated.Error()) | ||
assert.ErrorIs(t, err, user_model.ErrEmailAddressNotExist{}) // inactive email is considered as not exist for "MakeActiveEmailPrimary" | ||
|
||
email = &user_model.EmailAddress{ | ||
Email: "[email protected]", | ||
} | ||
err = user_model.MakeEmailPrimary(db.DefaultContext, email) | ||
email = unittest.AssertExistsAndLoadBean(t, &user_model.EmailAddress{Email: "[email protected]"}) | ||
err = user_model.MakeActiveEmailPrimary(db.DefaultContext, email.ID) | ||
assert.Error(t, err) | ||
assert.True(t, user_model.IsErrUserNotExist(err)) | ||
|
||
email = &user_model.EmailAddress{ | ||
Email: "[email protected]", | ||
} | ||
err = user_model.MakeEmailPrimary(db.DefaultContext, email) | ||
email = unittest.AssertExistsAndLoadBean(t, &user_model.EmailAddress{Email: "[email protected]"}) | ||
err = user_model.MakeActiveEmailPrimary(db.DefaultContext, email.ID) | ||
assert.NoError(t, err) | ||
|
||
user, _ := user_model.GetUserByID(db.DefaultContext, int64(10)) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.