KnowHows is a Slack application that tracks your GitHub repositories and allows users to search for other developers who have knowledge about certain parts of code, such as an API or software concept.
- Visual Studio 2017 or Visual Studio Community
- .NET Core 2.0
- srcML
- Apache Solr
- Navigate to
Website. - Create GitHub and Slack apps to generate the necessary OAuth tokens for each.
- Copy
appsettings.example.jsonasappsettings.json. - Update all the fields in the
AppSettingssection. The callback URLs for GitHub and Slack will be{WEBSITE_BASE_URL}/api/github/authenticateand{WEBSITE_BASE_URL}/api/slack/authenticaterespectively. - Setup Solr according to Apache's directions using the
schema.xmlandsolrconfig.xmlprovided in the docs. - Naming conventions for your created core MUST match that in
appsettings.json. This project communicates through an authenticated user. Setting this up is left to the installer, for simple open connections configure the connection inSolrManager.csto be just your connection string. - Make sure your Slack app has a slash command configured that makes requests to
{WEBSITE_BASE_URL}/api/slack/processmessage.
- Open
KnowHows.slnwith Visual Studio and clickBuild.
- Navigate to
Website. - Run
dotnet build. Alternatively, you can rundotnet publishto prepare the website for deployment.
- Before running the website, ensure that
appsettings.jsonis present in the directory that you'll be running the website from and thatsrcmlis available on your PATH. - From the command line, run
dotnet runin order to start the website.
From a Slack channel with KnowHows installed, the app can be invoked with the slash command /knowhows. When you invoke the command for the first time, the app will prompt for access to your GitHub account. The available commands are:
/knowhows to [query]- Performs a natural language search on a concept, such aswrite to a file. This produces a ranked list of tracked users indicating files that they have changed./knowhows search [query]- Performs a literal search on a code term, such as an API name likeFileWriter. This produces a ranked list of tracked users indicating files that they have changed./knowhows track [repository_name | *]- Tracks and indexes one or all (*) of your repositories. When no repository is specified, a list of your untracked repositories is returned./knowhows untrack [repository_name | *]- Untracks and unindexes one or all (*) of your repositories. When no repository is specified, a list of your currently tracked repositories is returned./knowhows help- Prints a brief description of each of these commands.

