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

User list for ignore to invite in room #94

Closed
BrotherWarrior opened this issue Nov 9, 2018 · 6 comments
Closed

User list for ignore to invite in room #94

BrotherWarrior opened this issue Nov 9, 2018 · 6 comments
Assignees

Comments

@BrotherWarrior
Copy link
Contributor

It would be great to have Bot-list or smth similar. Users from this list should not to be inveted in created room. We are using mail plugin in Jira, issues created from email contains creator username that is service account. If we add that users to common ignore list then issues created by service account ignoring to process by jira-to-matrix bot.

@w1r0x
Copy link
Contributor

w1r0x commented Nov 9, 2018

We already have this list in bot settings https://github.com/mobitel-ltd/jira-to-matrix/blob/master/config.example.js#L29

Is it OK for you?

@BrotherWarrior
Copy link
Contributor Author

BrotherWarrior commented Nov 9, 2018

Hi.

The problem is here

return [username, creator].reduce((acc, item) => {

If user in ingore list (creator or user who thigger room creation) then issue will be ignored and room is not created. But we need to create room. We need to ignore send invite to specific users in created room.

Let me explain. We have Jira email bot, This bot creating issues in Jira from incoming emails and new created issue has field creator set to bot username (let it JiraEmailUser). Helpdesk master (let it be user JiraMaster) set label Riot and it triggers webhook.
Jira-to-matrix bot get hook and here Issue.Creator = JiraEmailUser, User=JiraMaster.
Bot is checking for ignore issue, it look at ignore list and see JiraEmailUser here. Then variable isInUsersToIgnore sets to false

@w1r0x
Copy link
Contributor

w1r0x commented Nov 9, 2018

Just reread your first message and understand what you mean. Thanks for feedback. I think we can add it.

@grigori-gru
Copy link
Collaborator

Hello! As I understand, you want to have user list, which are not expected to be in room when it creates? It's seems to me you catch that ignore list is much more important, it doesn't let you anything with hook created by users from list?

@BrotherWarrior
Copy link
Contributor Author

Hi. Let's try again ))

I have Jira with several bots that creating issues (CI bot, email HelpDesk bot etc).
If we need to discuss this issue we add watchers to issue and set special label (it doesn't matter what way hook is triggered).
CIBot is Issue.Creator.
When Jira-To-Matrix bot processing hook it check User who triggers the hook and Issue.Creator in ignorelist and see CIBot in this list.
Jira-To-Matrix bot ignore this issue.

But we need create room. Jira-To-Matrix bot invites not only "human" accounts in chat room but CIBot too. CIBot is a service account and it never leave room, never post messages and so on.

List of bots is static and I want to deny to invite this users in any rooms, but I don't want to deny processing issues from bots.

@grigori-gru
Copy link
Collaborator

Hi!
I've done it. Just add new param to your config with users array.
#95

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants