Mattermost-server: [Help Wanted] [MM-12367] Create CLI command "team search"

Created on 29 Sep 2018  路  10Comments  路  Source: mattermost/mattermost-server

If you're interested please comment here and come join our "Contributors" community channel on our daily build server, where you can discuss questions with community members and the Mattermost core team. For technical advice or questions, please join our "Developers" community channel.

New contributors please see our Developer's Guide.


Notes: Jira ticket

Mattermost is improving its CLI interface and we're looking for contributors to help with that effort. This Help Wanted issue is to implement team search command in the CLI.

Allow searching teams like in user search command

Example: team search dev

Before you start, make sure you read this short Documentation

If you need other examples you can see the PR mattermost/mattermost-server#9094

Easy Hacktoberfest TecGo

All 10 comments

@esethna I would like to take up this issue.

Going through the documentation and other CLI commands right now.

Quick update :

I was able to run the API server and the Web app running but I'm facing issues with the CLI.

I ran go install in mattermost-server/cmd/mattermost to generate the executable but mostly all commands seems to throw an error. Here's the error log - https://pastebin.com/t77Mrraj

Could someone please help me with this?

Thanks

@waseem18 To run the CLI commands, you must be in the directory that contains the Mattermost executable.

On a default install of Mattermost, the directory is /opt/mattermost/bin. The name of the executable is mattermost.

For example, to get the Mattermost version on a default installation of Mattermost:

cd /opt/mattermost/bin
sudo ./mattermost version

Let me know if this helps?

Thanks for the response @jasonblais

I didn't install the CLI actually, I'm trying to build it from source.

And yes, I ran the command right from the directory where the executable is - the bin folder inside GOPATH i.e /Users/wasimthabraze/go

Still I get the same issue. And I'm on Mac.

I noticed that I'm getting the error for only some commands like

./mattermost channel (any subcommand)
./mattermost sampledata
./mattermost reset

Is this because of any configuration or database issue?

I see - what is the output you get from ./mattermost version?

The same error - https://pastebin.com/t77Mrraj

To give you a better picture that some command give output while some panic.

screen shot 2018-09-30 at 9 23 04 pm

go version : 1.11

Update : I'm trying this on my Ubuntu machine

Thank you - I'll need to get a developer's help review the errr next. I linked some of the conversation from here to your post in the Developers channel https://pre-release.mattermost.com/core/pl/a5gdbgbzebfeiri6paabf6ca5o

Thanks for that @jasonblais

So I got it running finally by another way.

Instead of generating an executable and running it, I tried running the main.go file present in the cmd directory with the arguments as commands and it seems to work.

Example : go run main.go team create --name mynewteam --display_name "My New Team"

Now that I got the setup running, I've started working on the issue and will put a PR once done. :)

Glad you got it working :)

Was this page helpful?
0 / 5 - 0 ratings