POET is an intelligent Slack-Bot that knows more about your JIRA project than anybody else on the team!
Check out this video to get an idea of the POET project.
This project was proposed and supported by Agile Digital as part of the Australian National University's TechLauncher initiative.
-
Download Activator and add it to your PATH.
-
Install Hubot by run
npm install -g yo generator-hubot
in your terminal -
Download and install Docker.
First, go to the Slack Apps&Configurations for Hubot and sign to the Slack team you want our bot to be added to.
Then creat a new hubot configuration by giving the bot a name, then your own hubot-slack API token is generated.
Now you can invite the bot to the channel you want, but the bot is inactive and cannot speak at the moment. Follow the next steps to make it alive!
-
To host PSQL on local host using Docker(required to do only the first time)
docker run -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=password -d postgres
-
Then start the postgres before running POET
docker start postgres
-
To alter the database
docker exec -it postgres bash
-
To enter psql using -U postgres
psql -U postgres
-
To create a database
postgres=# CREATE DATABASE database_name_here;
-
To create a user
postgres=# Create USER user_name_here WITH PASSWORD 'user_password_here';
-
To set or change the owner of the database
postgres=# ALTER DATABASE database_name_here OWNER TO user_name_here;
This part is for people who want to develop future features based on POET. If you just want to try the current features of POET, please skip it.
Import POET into LUIS and train it. A good tutorial can be found on LUIS's homepage.
Set-up environment variables for your Atlassian JIRA instance:
- JIRA_USERNAME="JIRA username"
- JIRA_PASSWORD="JIRA password" (Your password will not be visible to other users or developers).
- JIRA_BASE_URL="JIRA server domain"
Set-up environment variables for Postgress Database:
- DB_HOST="database host"
- DB_NAME="database name"
- DB_USERNAME="database username"
- DB_PASSWORD="database password"
Set-up environment variables for LUIS:
- LUIS_URL="LUIS app url"
- LUIS_APPID="LUIS app id"
- LUIS_SUBSCRIPTION_KEY="LUIS subscription key"
-
Create a new directory and do a git clone using command-line.
git clone https://github.com/agiledigital/poet-slack-bot
-
From your command-line, go to the server directory from the directory where you have cloned the project and run the activator by using the following line.
activator run
-
Go back the client directory of the directory where you have cloned the project and run the hubot using the following code. Make sure to replace YOUR_HUBOT_SLACK_API_TOKEN_HERE with the API token obtained in the previous step.
HUBOT_SLACK_TOKEN=YOUR_HUBOT_SLACK_API_TOKEN_HERE ./bin/hubot --adapter slack
After successfully running the client side and server side, the bot is now active in your channel. Let's have a conversation with it!
Here are some examples questions you can try asking the bot:
Here is a list of features that were already developed.
- Say hi to POET, then it will introduce itself to you.
-
POET is now able to fetch five types of information of project from JIRA:
- To know the description of a ticket, there are various question forms the users can ask the bot. The example below shows the query about the description of a ticket, for example, POET-45, which is a ticket in POET project.
- When it comes to the assignee of a ticket, there are also various forms of questions the users can ask the bot. The snapshot below demonstrates the query about the assignee of a ticket, for example, POET-5, which is aslo a ticket in POET project.
- POET can understand the query about the status of a ticket in various forms and fetch the status information about the ticket.
- POET can fetch a list of tickets a person is currently working on from JIRA:
-
When POET cannot understand a question or cannot find the information, it will also reply the users.
- POET can store all the questions the users asked in database, which will help improve it’s performance through later analysing and training with the dataset.
There are two steps to improve the intelligence of the bot:
-
Explore the JIRA Rest API to find out the information that can be fetched, e.g. the status of a ticket
-
Train the bot to make it understand various types of questions, e.g. what are the tickets in progress? A quick way to make the bot understand that is to import our POET-SLACK-BOT to LUIS and use LUIS to train it. Or you can update the decision trees for the bot.
After collecting the feedback, we sort out a list of features which are worth to develop in the future as shown below. Basically the features can be divided into two groups:
-
Incorporate more questions for fetching information from JIRA:
i. What are the tickets in progress/stalled/completed?
ii. What tickets need testing?
iii. What are the tickets I'm working on?
iv. How long has the issue has been stalled?
v. Show me the changes since yesterday.
-
Incorporate questions for modifying information on JIRA:
i. Please stall YOUR_TICKET_KEY_HERE
ii. Please move YOUR_TICKET_KEY_HERE to completed
iii. Can you resolve all sub-tasks of POET-1?
iv. Please assign YOUR_TICKET_KEY_HERE to YOUR_TEAM_MEMBER_NAME_HERE.
We are a team of students from the Australian National University (ANU). We're passionate about harnessing the potential of artificial intelligence to make work and life better.
Original authors of the code in this package include (in alphabetical order): Team Members:
- Dongxu Li
- Qin Tian
- Sabina Pokhrel
- Xu Wang
Contact [email protected].
The authors would like to thank Agile Digital for the proposal and guidance.
This work is licensed under the Apache License Version 2.0 (APLv2).