Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow Organisations to have a E-Mail #25082

Merged
merged 18 commits into from
Jul 25, 2023
Merged

Conversation

JakobDev
Copy link
Contributor

@JakobDev JakobDev commented Jun 5, 2023

Resolves #25057

This adds a E-Mail field to Organisations. The E-Mail is just shown on the Profile when it is visited by a logged in User. The E-mail is not used for something else.

Screenshots:
grafik
grafik

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Jun 5, 2023
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Jun 5, 2023
@pull-request-size pull-request-size bot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 5, 2023
templates/org/home.tmpl Outdated Show resolved Hide resolved
@silverwind
Copy link
Member

Test failure related:

    api_user_orgs_test.go:103: 
        	Error Trace:	/home/runner/work/gitea/gitea/tests/integration/api_user_orgs_test.go:103
        	Error:      	Not equal: 
        	            	expected: []*structs.Organization{(*structs.Organization)(0xc006c53a40), (*structs.Organization)(0xc006c53ae0)}
        	            	actual  : []*structs.Organization{(*structs.Organization)(0xc005f24dc0), (*structs.Organization)(0xc005f24e60)}
        	            	
        	            	Diff:
        	            	--- Expected
        	            	+++ Actual
        	            	@@ -5,3 +5,3 @@
        	            	   FullName: (string) (len=7) "User 17",
        	            	-  Email: (string) "",
        	            	+  Email: (string) (len=18) "user17@example.com",
        	            	   AvatarURL: (string) (len=79) "https://secure.gravatar.com/avatar/a52ccb1440980e69f85854c2a6019a8c?d=identicon",
        	            	@@ -18,3 +18,3 @@
        	            	   FullName: (string) (len=26) " <<<< >> >> > >> > >>> >> ",
        	            	-  Email: (string) "",
        	            	+  Email: (string) (len=17) "user3@example.com",
        	            	   AvatarURL: (string) (len=79) "https://secure.gravatar.com/avatar/97d6d9441ff85fdc730e02a6068d267b?d=identicon",
        	Test:       	TestMyOrgs

@denyskon
Copy link
Member

denyskon commented Jul 1, 2023

@JakobDev I opened a PR to your branch: JakobDev#1

I fixed the failing test and also adjusted some styling to align icons properly. I think then the PR should be ready.

@JakobDev
Copy link
Contributor Author

JakobDev commented Jul 1, 2023

I looks like something gone wrong with your PR

@denyskon
Copy link
Member

denyskon commented Jul 1, 2023

@JakobDev I resolved the conflict

Merge main into orgmail; fix test; adjust style
@JakobDev
Copy link
Contributor Author

JakobDev commented Jul 1, 2023

I merged it now. Thanks.

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Jul 1, 2023
@silverwind silverwind added the type/feature Completely new functionality. Can only be merged if feature freeze is not active. label Jul 3, 2023
silverwind
silverwind previously approved these changes Jul 3, 2023
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jul 3, 2023
@silverwind silverwind dismissed their stale review July 5, 2023 06:50

See above

@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. labels Jul 5, 2023
Copy link
Contributor

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use "Contact Email" and go on.

@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Jul 24, 2023
@denyskon denyskon added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 24, 2023
Copy link
Member

@delvh delvh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I see that correctly, we don't need a migration.
LGTM as long as that is true.

@JakobDev
Copy link
Contributor Author

JakobDev commented Jul 24, 2023

The Organisation model is based on the User model, so it already has a EMail field. No Migration needed.

@lunny lunny added this to the 1.21.0 milestone Jul 24, 2023
@silverwind silverwind enabled auto-merge (squash) July 25, 2023 08:24
@silverwind silverwind merged commit 6598d02 into go-gitea:main Jul 25, 2023
23 checks passed
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Jul 25, 2023
@JakobDev JakobDev deleted the orgmail branch July 25, 2023 08:29
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jul 26, 2023
* giteaofficial/main: (21 commits)
  Only show newly pushed branches message in the same repository (go-gitea#26148)
  Docusaurus-ify (go-gitea#26051)
  Display deprecated warning in admin panel pages as well as in the log file (go-gitea#26094)
  Remove "misc" scope check from public API endpoints (go-gitea#26134)
  Fix LFS object list style (go-gitea#26133)
  Drop the correct deleted branch table (go-gitea#26028)
  Fix CLI allowing creation of access tokens with existing name (go-gitea#26071)
  Fix incorrect router logger (go-gitea#26137)
  Increase table cell horizontal padding (go-gitea#26140)
  Update xorm version (go-gitea#26128)
  Fix UI for release tag page / wiki page / subscription page (go-gitea#25948)
  added ssh mirror workaround description (go-gitea#26096)
  Improve "gitea doctor" sub-command and fix "help" commands (go-gitea#26072)
  Fix wrong commit status in web ui (go-gitea#26121)
  remove IsWarning in  tmpl (go-gitea#26120)
  Fix minor capitalization error in string (go-gitea#26100)
  Improve commit graph alignment and truncating (go-gitea#26112)
  Fix wrong workflow status when rerun a job in an already finished workflow (go-gitea#26119)
  Allow Organisations to have a E-Mail (go-gitea#25082)
  doc sync authentication.md to zh-cn (go-gitea#26117)
  ...
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Oct 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/feature Completely new functionality. Can only be merged if feature freeze is not active.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Public email address for organization profiles
8 participants