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

✨ use bot account #42

Merged
merged 3 commits into from
May 15, 2019
Merged

✨ use bot account #42

merged 3 commits into from
May 15, 2019

Conversation

manland
Copy link
Contributor

@manland manland commented May 11, 2019

Huge thanks to @crspeller for inspiration

Cc @hanzei @DHaussermann

Fix #9
Fix #6
Fix #20

Copy link
Collaborator

@hanzei hanzei left a comment

Choose a reason for hiding this comment

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

LGTM 👍. Two non blocking comments.

@@ -3,6 +3,7 @@
"name": "GitLab",
"description": "GitLab plugin for Mattermost.",
"version": "0.2.0",
"min_server_version": "5.10.0",
Copy link
Collaborator

Choose a reason for hiding this comment

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

🎉 🚀

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please keep in mind that you have to bump this to 5.12 eventually.

@@ -47,7 +48,7 @@ func (p *Plugin) getCommandResponse(responseType, text string) *model.CommandRes
ResponseType: responseType,
Text: text,
Username: GITLAB_USERNAME,
IconURL: p.getConfiguration().ProfileImageURL,
IconURL: path.Join(*p.API.GetConfig().ServiceSettings.SiteURL, "plugins", manifest.Id, "assets", "profile.png"),
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can use GetBundlePath instead.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nop, GetBundlePath return an absolute path e.g. /home/user/.... I want an http URL. Maybe a cool helper could be GetHTTPBundlePath!?

Copy link
Collaborator

Choose a reason for hiding this comment

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

🤦‍♂️ Your correct.

Copy link
Collaborator

Choose a reason for hiding this comment

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

What would GetHTTPBundlePath() return? ServiceSettings.SiteURL + "plugins" + pluginID?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes 💯

github.com/mattn/go-sqlite3 v1.10.0 // indirect
github.com/mitchellh/go-testing-interface v1.0.0 // indirect
github.com/mitchellh/mapstructure v1.1.2 // indirect
github.com/mattermost/mattermost-server v0.0.0-20190509204005-3f3bc5c49c37
Copy link
Collaborator

Choose a reason for hiding this comment

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

🎉

server/plugin.go Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants