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

Feature: Support mattermost notifier #31

Closed
wants to merge 0 commits into from
Closed

Conversation

frezbo
Copy link
Contributor

@frezbo frezbo commented May 14, 2021

Signed-off-by: Noel Georgi git@frezbo.dev

search.go Outdated
Comment on lines 256 to 257
apiToken := os.Getenv("MATTERMOST_API_TOKEN")
client := mattermost.NewAPIv4Client(os.Getenv("MATTERMOST_URL"))
Copy link
Owner

Choose a reason for hiding this comment

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

@frezbo it should also work if someone passes the creds with CLI flags

search.go Outdated
if res.StatusCode != 200 {
return errors.New("Auth failure")
}
direct, res := client.CreateDirectChannel(user.Id, os.Getenv("MATTERMOST_USER_ID"))
Copy link
Owner

Choose a reason for hiding this comment

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

same here, it should be possible to provide userID as a CLI flag

README.md Outdated
#### Notifications to mattermost

```
ATTERMOST_URL="<mattermost url>" MATTERMOST_API_TOKEN="<mattermost bot api token>" MATTERMOST_USER_ID="<mattermost user id>" ./covaccine-notifier --state Maharashtra --district Akola --age 27 -n mattermost
Copy link
Owner

Choose a reason for hiding this comment

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

Please add an example with CLI flags. It should be possible to provide Mattermost creds with CLI args

@PrasadG193
Copy link
Owner

@frezbo Please run go mod tidy. Looks like go.sum is not tidyed

@PrasadG193
Copy link
Owner

FYI, I am working on refactoring notifier interface. We might need to do some changes accordingly
#33 (comment)

@frezbo
Copy link
Contributor Author

frezbo commented Jun 1, 2021

I'll create a new PR once #33 is merged. So that I can rebase based on the new notifier interface. Thanks 👍

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

Successfully merging this pull request may close these issues.

2 participants