Skip to content

@dcbot

All interaction with the company bot @dcbot is performed through Mattermost. Simply message the bot help to see all available commands.

The bot is there to make company organisation flatter (no need to ask permission all the time) and more transparent (bot code is there for employees to see and tweak).

Below are all of the commands everyone can use:

Main command

  • help - Displays the help message.

Role commands

  • list - Displays all enabled roles in the company with their availability status.
  • details - Displays the chosen role’s details.
  • enrol - Request to enrol in a role.
  • unenrol - Unenrol from a role.
  • invite - Invite a user to enrol into a role.
  • personal - Displays your personal roles.
  • create - Create a new role.

Label commands

  • labels - Displays all of the official labels with their description.
  • priority - Displays the priority that is used to sort issues.

Other commands

  • sickness - Make a sick leave report.
  • preferences - Open your preferences dialog.
  • username - Add your Gitlab username for task distribution.
  • reject_issue - Ask for a new issue with a reason

Roles

d-centralize uses Roles for work distribution. A single Role can be anything from a simple office chore to an employee’s status in a certain development project.

There are many small tasks in running a company. Usually people dedicate 90%-95% time to their main Role, which is usually their development project, but it’s expected to distribute all smaller jobs across employees too. Even though some of these Roles are optional, taking part in them benefits everyone in the company.

In order to stay organized everyone is encouraged to enrol into their corresponding development project Role as well as take at least one chore if there are any available at the moment.

Apart from tracking who is working on which project, development Roles also automatically grant access to whatever resources they may need to all employees that enrol into it. Likewise, when someone unenrols or gets kicked from a Role, they lose access to those same resources unless another Role grants access to them.

Daily message

Each day, all employees at D-centralize receive a message from the bot. This daily message includes several different things that an employee may find helpful. Below is the information included in the daily message:

  • Some issues that require labels
  • One or more issues that have been selected to work on because of highest importance.
  • Merge requests where you are the reviewer
  • Discussion issues where you are mentioned and have not yet responded
  • (Optional with support role) Support issues with no public response
  • Failing Renovate bumps for projects you work in

Support issues

When you select the support role in Mattermost, you also receive support issues in your daily message. These issues do not need to be completed immediately. They just need an initial response for the customer.

Failing Renovate bumps

Throughout our projects, we have a Renovate bot that merges code to main if the pipelines succeed. These pipelines can sometimes fail. When this happens, the bot will keep trying until the pipeline succeeds. If the Renovate bot is stuck for a few days, the DC bot will assign the issue to an employee in the same project. It is expected that you try to fix the pipeline if you are selected to do so.

Rejecting an issue

It can happen that you receive an issue you cannot complete for various reasons. If this happens, you can send reject_issue to the DC bot in Mattermost. You will then be asked to provide a reason why you cannot complete the issue. After providing a reason, the bot will select a new issue for you. You can also mention another username in the reason by adding @gitlab_username in the reason field. The bot will then assign the issue to that user in GitLab as an issue they can receive. Make sure that the person you add is in a role that has access to the project where the issue is located.

If the rejected issue has a priority label of high or lower, nothing else will happen to it. When the issue has a priority label of urgent or critical, it will be immediately reassigned to someone else. That person will receive the issue along with your provided reason for why you could not complete it. This can help resolve the issue if you include your findings in the reason.

Issue Prioritization Logic

The bot selects and suggests issues based on the following logic:

  1. Selecting projects

    • First, the bot retrieves all projects the user is in. Then it will pick a random project for the day to complete an issue in
  2. Critical/Urgent Labels

    • Before the bot selects a issue for the user it first looks at all of the user projects and looks for the following two labels.

      • priority::critical
      • priority::urgent
    • These issues are always prioritized first, regardless of their mission. For an current overview of all the labels type labels to the dc-bot in a Mattermost DM.

    • If the issue has the label Blocked it will select the first linked issues from the blocked issue. If the linked issue does not have the same issue or priority label as it’s linked main issue the issue will get the labels from the main issue.

  3. Mission-Based Selection

    • After critical/urgent issues, the bot begins working through the missions in the selected project:

      • It starts with sorting all of the project issues based on the following criteria:

        1. Priority label (priority::high, priority::medium, etc.)
        2. Type label (bug, feature, security, etc.)
        3. Issue creation date (from oldest to newest)
      • After sorting the bot picks the first issue in the sorted list.

      • It picks this issue and goes through the list of roadmaps:

        • Issues with project level roadmaps.
        1. Does the selected issue have the first roadmap in the list.
        2. If not, the bot looks if any other issue in the sorted list has this label and picks that.
        3. If no other issue has the first label it continues to the second mission label.
        4. Repeats step 1 and 2 but now with the second roadmap label in the list.
        5. Continues this until it has gone through all roadmap labels.
        • Issues with group level roadmaps
        1. If the project does not have a project level roadmap it looks if it has a group level roadmap.
        2. Repeats step 1 through 5 from the project level but than on group level.
    • For now in its first version the bot selects one issue at a time for users. This can be increased later by going through the method again to select another issue.

  4. Standalone Issues

    • If there are issues without any mission label, they will only be selected after the critical/urgent issues and only if no issues remain with a mission label.

Project completion overview

The bot will also make messages in the various Mattermost Town Square channels about the progress of issues. This message will contain all of the issues that were completed the day before. And all of the issues that members will work on today. The issues from that day will also include how much time is already spent on that issue. And if a issue is close to being to late to complete with the estimated time and time already spent.

It will also make a overview for each mission weekly in the Town Square channels. In this message the dc bot will list all of the missions from that d-centralize team. For each mission it will list how many issues are linked to the mission, how many are completed, what the total estimated time is and how much is already spent on it.