mattermost-plugin-github icon indicating copy to clipboard operation
mattermost-plugin-github copied to clipboard

[issue 513] After subscribing the event, need to display event name with the success message. #513

Open sibasankarnayak opened this issue 4 years ago • 33 comments

added a post in channel on successfully subscribing any org/[repo] with event it subscribed with message if it got overwritten.

ticket here Fixes #513 Fixes #512

sibasankarnayak avatar Nov 30 '21 17:11 sibasankarnayak

Hello @sibasankarnayak,

Thanks for your pull request! A Core Committer will review your pull request soon. For code contributions, you can learn more about the review process here.

mattermod avatar Nov 30 '21 17:11 mattermod

Codecov Report

Merging #517 (d839826) into master (b7368d5) will decrease coverage by 0.27%. The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master     #517      +/-   ##
==========================================
- Coverage   15.57%   15.29%   -0.28%     
==========================================
  Files          15       15              
  Lines        4136     4211      +75     
==========================================
  Hits          644      644              
- Misses       3450     3525      +75     
  Partials       42       42              
Impacted Files Coverage Δ
server/plugin/command.go 7.41% <0.00%> (-1.21%) :arrow_down:
server/plugin/subscriptions.go 10.46% <0.00%> (+0.35%) :arrow_up:

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 b7368d5...d839826. Read the comment docs.

codecov-commenter avatar Nov 30 '21 17:11 codecov-commenter

@sibasankarnayak when i deploy it i'm getting this error this plugin failed to start. Check your system logs for errors.plugin is starting. can you pls share the zip file of this PR?

dipak-demansol avatar Dec 03 '21 09:12 dipak-demansol

@sibasankarnayak when i deploy it i'm getting this error this plugin failed to start. Check your system logs for errors.plugin is starting. can you pls share the zip file of this PR?

it is not a easy task to share the zip file , it will be good if you start using it in any local to deploy as mentioned using plugin doc

sibasankarnayak avatar Dec 03 '21 11:12 sibasankarnayak

@hanzei i have added the fix for issue #512 as per our discussion.

sibasankarnayak avatar Dec 08 '21 13:12 sibasankarnayak

@hanzei @mickmister when i subscribe to the repo then i'm getting two bot post, i think we should only show 1 bot post to the user who subscribe the repo, we Should show the 1st bot post that visible to the all member in the channel including the member who subscribe the repo and we should remove the "only visible to you" bot post because why we need 2 bot post that give the same info. pls see the screenshot Screenshot from 2021-12-09 01-50-06

dipak-demansol avatar Dec 08 '21 20:12 dipak-demansol

Good catch @dipak-demansol :+1:

hanzei avatar Dec 09 '21 09:12 hanzei

@sibasankarnayak pls let me know when its ready for review.

dipak-demansol avatar Dec 13 '21 17:12 dipak-demansol

Non blocking point Screenshot from 2021-12-15 18-53-37 @hanzei pls see the last 2 subscription in the screenshot. may be we should also show the org/user name so there will be no confusion if someone subscribe same name repo of the different org/user ?

dipak-demansol avatar Dec 15 '21 13:12 dipak-demansol

@dipak-demansol Good suggestion, see https://github.com/mattermost/mattermost-plugin-github/pull/517#discussion_r769377088 for the request

hanzei avatar Dec 15 '21 19:12 hanzei

This PR has been automatically labelled "stale" because it hasn't had recent activity. A core team member will check in on the status of the PR to help with questions. Thank you for your contribution!

/cc @aspleenic

mattermod avatar Dec 26 '21 01:12 mattermod

@mickmister This is ready for your review.

hanzei avatar Jan 25 '22 14:01 hanzei

@hanzei @mickmister pls see the attached image, when i subscribe the repo then i got two post, 1st is visible to all member in the channel and 2nd is only visible to me, in 1st post only "repo" name is visible but in 2nd post "user-name/repo-name" is visible, my point is same information should be added in the 1st post so all channel member can see the "user-name/repo-name".

image

non-blocking point :- i don't know why we need two post, we can also show One Post that visible to all member, pls let me know your ok with that two post? of visible to all member & only visible to me.

dipak-demansol avatar Feb 02 '22 09:02 dipak-demansol

@sibasankarnayak I would agree here that the ephemeral posts for successfully adding subscription are redundant. Only failures and validation would still need ephemeral posts. That said it is minor and I'd be happy to open a separate issue for this.

However, the 1st point made by @dipak-demansol is more impactful. The post should include the owner or organization in the format we always use. Having only the repo name can cause confusion as there are many cases where this could overlap. Is it possible to address this in this PR?

DHaussermann avatar Feb 02 '22 14:02 DHaussermann

:+1: for fixing both issues in this PR

hanzei avatar Feb 02 '22 19:02 hanzei

@sibasankarnayak I would agree here that the ephemeral posts for successfully adding subscription are redundant. Only failures and validation would still need ephemeral posts. That said it is minor and I'd be happy to open a separate issue for this.

However, the 1st point made by @dipak-demansol is more impactful. The post should include the owner or organization in the format we always use. Having only the repo name can cause confusion as there are many cases where this could overlap. Is it possible to address this in this PR?

@DHaussermann sure added org info in message image

sibasankarnayak avatar Feb 16 '22 17:02 sibasankarnayak

@sibasankarnayak Would you please remove the duplicate message as request in https://github.com/mattermost/mattermost-plugin-github/pull/517#issuecomment-1027729108?

hanzei avatar Feb 18 '22 18:02 hanzei

FYI :- Build is Fail After Enable it, internally working on with dev.

dipak-demansol avatar Feb 18 '22 18:02 dipak-demansol

Both of your findings should be fixed as part of this PR. The PR won't go into v2.2.0 anyway.

hanzei avatar Feb 22 '22 14:02 hanzei

Blocking on #517 (review)

@dipak-demansol can you test now

  1. only one notification by bot will be there
  2. while unsubscribe there will be a bot notification

please share if you found any issue

sibasankarnayak avatar Feb 22 '22 16:02 sibasankarnayak

Blocking on #517 (review)

@dipak-demansol can you test now

  1. only one notification by bot will be there
  2. while unsubscribe there will be a bot notification

please share if you found any issue

As we know the issue, build is failed because its created from my linux machine, later i will create build from mac machine then test it.

dipak-demansol avatar Feb 22 '22 20:02 dipak-demansol

@sibasankarnayak pls do the text changes as per the below example.

when user Subscribe repo @someone added a subscription to repository "ORG/repo-name" with events A, B, C

When user remove repo @someone delete a subscription to repository "ORG/repo name"

When user overwrite events of same repo @someone added a subscription to repository "ORG/repo-name" with events A The previous subscription with: pulls, issues, creates, deletes was overwritten.

pls let me know if you have any Question.

dipak-demansol avatar Feb 23 '22 18:02 dipak-demansol

@sibasankarnayak pls do the text changes as per the below example.

when user Subscribe repo @someone added a subscription to repository "ORG/repo-name" with events A, B, C

When user remove repo @someone delete a subscription to repository "ORG/repo name"

When user overwrite events of same repo @someone added a subscription to repository "ORG/repo-name" with events A The previous subscription with: pulls, issues, creates, deletes was overwritten.

pls let me know if you have any Question.

@mickmister @hanzei need some suggestion for the message to better the ux message shown on subscribe and unsubscribe

current messages are like this Subscribe subscription made first time : A subscription to repository sibasankarnayak/mattermost-plugin-github, was added to this channel by @sibasankarnayak with events: issues,creates A subscription to organization sibasankarnayak, was added to this channel by @sibasankarnayak with events: issues,creates

unsubscribe notification

Unsubscribed from organization sibasankarnayak on this channel was done by @sibasankarnayak Unsubscribed from repositories sibasankarnayak/mattermost-plugin-github on this channel was done by @sibasankarnayak

please suggest some better notification messages.

sibasankarnayak avatar Feb 24 '22 14:02 sibasankarnayak

@sibasankarnayak pls do the text changes as per the below example. when user Subscribe repo @Someone added a subscription to repository "ORG/repo-name" with events A, B, C When user remove repo @Someone delete a subscription to repository "ORG/repo name" When user overwrite events of same repo @Someone added a subscription to repository "ORG/repo-name" with events A The previous subscription with: pulls, issues, creates, deletes was overwritten. pls let me know if you have any Question.

@mickmister @hanzei need some suggestion for the message to better the ux message shown on subscribe and unsubscribe

current messages are like this Subscribe subscription made first time : A subscription to repository sibasankarnayak/mattermost-plugin-github, was added to this channel by @sibasankarnayak with events: issues,creates A subscription to organization sibasankarnayak, was added to this channel by @sibasankarnayak with events: issues,creates

unsubscribe notification

Unsubscribed from organization sibasankarnayak on this channel was done by @sibasankarnayak Unsubscribed from repositories sibasankarnayak/mattermost-plugin-github on this channel was done by @sibasankarnayak

please suggest some better notification messages.

@aaronrothschild @cwarnermm can you share your input on same to make the text notification more meaningful.

sibasankarnayak avatar Feb 24 '22 18:02 sibasankarnayak

Hi @sibasankarnayak! Thanks for reaching out for guidance on developing helpful product guidance for customers. For this set of use cases, here are the UI strings I would recommend:

Subscribe: [name] subscribed this channel to [reponame] with the following events: [x], [y]. [name] subscribed this channel to [orgname] with the following events [x], [y].

Unsubscribe: [name] unsubscribed this channel from [orgname]. [name] unsubscribed this channel from [reponame].

cwarnermm avatar Feb 25 '22 16:02 cwarnermm

Hi @sibasankarnayak! Thanks for reaching out for guidance on developing helpful product guidance for customers. For this set of use cases, here are the UI strings I would recommend:

Subscribe: [name] subscribed this channel to [reponame] with the following events: [x], [y]. [name] subscribed this channel to [orgname] with the following events [x], [y].

Unsubscribe: [name] unsubscribed this channel from [orgname]. [name] unsubscribed this channel from [reponame].

@cwarnermm Thank you for suggestion

@dipak-demansol can you check have made the changes as per suggestion

sibasankarnayak avatar Feb 25 '22 17:02 sibasankarnayak

@sibasankarnayak when user delete the repo, after the ORG name pls show the repo name same as when your showing it at the time of subscription. image

it should be like this @dipak-app-bar-disable unsubscribed this channel from dipak-demansol/hello

dipak-demansol avatar Feb 28 '22 11:02 dipak-demansol

1/5 that specific format parameters should be used if possible. E.g. %s is preferred over %v.

@hanzei tried with %s perviously working as expected but not it was looking like this so used %v instead of %v image

sibasankarnayak avatar Mar 01 '22 11:03 sibasankarnayak

%!(EXTRA is printed when where are more arguments when parameters. Are you sure the verb caused the issue you are seeing?

hanzei avatar Mar 01 '22 11:03 hanzei

%!(EXTRA is printed when where are more arguments when parameters. Are you sure the verb caused the issue you are seeing?

not sure but it works now with %s

can you check now

sibasankarnayak avatar Mar 01 '22 12:03 sibasankarnayak