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

Add mentionable teams to tributeValues and change team mention rules to gh's style #13198

Merged
merged 11 commits into from
Dec 21, 2020

Conversation

a1012112796
Copy link
Member

@a1012112796 a1012112796 commented Oct 18, 2020

As title, example view:
image

TODO:

  • Maybe need change the rule for team mention to @{{OrgName}}/{{TeamName}} to protect a team have same name with a user.
  • have no idea about how to fix avatar bug now (use org's avator now)

Signed-off-by: a1012112796 <1012112796@qq.com>
@6543
Copy link
Member

6543 commented Oct 18, 2020

@a1012112796 avatar bug: use the same icon as with pullreview-requested-teams:

Screenshot at 2020-10-18 21-43-47
?

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 18, 2020
@silverwind
Copy link
Member

silverwind commented Oct 18, 2020

use the same icon as with pullreview-requested-teams

I'd use the org avatar if possible

@lafriks
Copy link
Member

lafriks commented Oct 18, 2020

Imho we should prefix them with org name and other possibility is to use specific group icon

a1012112796 and others added 3 commits October 19, 2020 15:53
Co-authored-by: silverwind <me@silverwind.io>
* use org's avator as team avator in ui

Signed-off-by: a1012112796 <1012112796@qq.com>
@a1012112796 a1012112796 changed the title Add mentionable teams to tributeValues Add mentionable teams to tributeValues and change team mention rules to gh's style Oct 19, 2020
@lunny
Copy link
Member

lunny commented Oct 21, 2020

I think maybe we should support mention anyone at first.

@a1012112796

This comment has been minimized.

@lunny
Copy link
Member

lunny commented Oct 23, 2020

I think maybe we should support mention anyone at first.

Do you means "@ALL" ?

No. I mean currently we can only mention the orgnizaion members. We should allow to mention anyone in this Gitea instance.

@a1012112796
Copy link
Member Author

a1012112796 commented Oct 23, 2020

I think maybe we should support mention anyone at first.

Do you means "@ALL" ?

No. I mean currently we can only mention the orgnizaion members. We should allow to mention anyone in this Gitea instance.

you can mention anyone now. but not support hint on ui now. gitea only add all assignees and participants to the list now.

modules/markup/html.go Outdated Show resolved Hide resolved
@codecov-io
Copy link

codecov-io commented Oct 23, 2020

Codecov Report

Merging #13198 (66ed233) into master (29d12cf) will increase coverage by 0.00%.
The diff coverage is 50.56%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master   #13198   +/-   ##
=======================================
  Coverage   42.32%   42.33%           
=======================================
  Files         726      726           
  Lines       77689    77752   +63     
=======================================
+ Hits        32885    32915   +30     
- Misses      39406    39431   +25     
- Partials     5398     5406    +8     
Impacted Files Coverage Δ
modules/markup/html.go 78.54% <0.00%> (-0.30%) ⬇️
modules/references/references.go 85.03% <ø> (ø)
modules/setting/repository.go 57.69% <ø> (ø)
routers/api/v1/repo/migrate.go 45.71% <0.00%> (-1.01%) ⬇️
routers/repo/migrate.go 39.56% <0.00%> (-2.74%) ⬇️
routers/repo/pull.go 31.79% <33.33%> (+<0.01%) ⬆️
routers/repo/issue.go 38.17% <40.00%> (+0.03%) ⬆️
routers/admin/users.go 27.98% <50.00%> (+0.20%) ⬆️
models/issue.go 57.14% <83.33%> (+0.23%) ⬆️
modules/context/context.go 57.29% <100.00%> (+0.23%) ⬆️
... and 7 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b1adab...66ed233. Read the comment docs.

@silverwind
Copy link
Member

I generally think those mentions need to be rewritten to use a AJAX call to obtain the mentionees. I think tribute.js already supports async loading of data. Doesn't need to be done in this PR but would be nice to have.

models/issue.go Outdated Show resolved Hide resolved
@lafriks lafriks added the type/enhancement An improvement of existing functionality label Oct 23, 2020
@lafriks lafriks added this to the 1.14.0 milestone Oct 23, 2020
Co-authored-by: Lauris BH <lauris@nix.lv>
@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 Oct 24, 2020
models/issue.go Outdated Show resolved Hide resolved
@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 Dec 21, 2020
@6543 6543 merged commit 34df4e5 into go-gitea:master Dec 21, 2020
@a1012112796 a1012112796 deleted the team_mention_tribute branch December 22, 2020 02:48
@go-gitea go-gitea locked and limited conversation to collaborators Feb 11, 2021
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. type/enhancement An improvement of existing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants