Code Monkey home page Code Monkey logo

cybercog / telegram-devpoker-bot Goto Github PK

View Code? Open in Web Editor NEW
6.0 3.0 3.0 47 KB

Planning Poker (Scrum Poker) for Agile software development teams. The bot allows you to introduce a consensus-based, gamified technique of task estimating into Telegram group chats.

License: MIT License

Dockerfile 0.46% Python 98.53% Shell 1.01%
telegram telegram-bot chat-bot chat-bots planning-poker planning-poker-game scrum-poker telegram-bots collaboration estimating

telegram-devpoker-bot's Introduction

Telegram DevPoker Bot

Discord Releases License

Planning Poker (Scrum Poker) for Agile software development teams. The bot allows you to introduce a consensus-based, gamified technique of task estimating into Telegram group chats.

devpoker-hero-image

Usage

⚠️ Work in progress. Public bot may be offline until the first stable release.

Add @devpoker_bot to the group chat.

To start Planning Poker use /poker command. Add any description after the command to provide context.

Example:

/poker https://issue.tracker/TASK-123

Example with multiline description:

/poker https://issue.tracker/TASK-123
Design DevPoker bot keyboard layout

Only initiator can open cards or restart game at any moment.

Discussion phase

Discussion phase votes:

  • πŸ‘ β€” Ready to estimate
  • ⁉️ β€” I have a questions or something to add
  • βœ‚οΈ β€” Split task into subtasks
  • ☠️️ β€” Cancel task (already done or not actual)
  • ♾️ β€” Impossible to estimate or task cannot be completed
  • β˜•οΈ β€” I need a break

Estimation phase

Currently, there is only one sequence of numbers:

0.5, 1, 2, 3, 4, 5
6, 7, 8, 9, 10, 12
18, 24, 30, 36

Special cases:

  • ❓ β€” Unsure how to estimate (out of context, never solved such tasks)

Self-hosted usage

Bot works on Python 3.6.

Run run.sh script with bot api token to start the Docker container.

You need to obtain own bot token from https://t.me/BotFather, then run:

DEVPOKER_BOT_API_TOKEN=11111424242:some-token ./run.sh

This command will create image and container devpoker-bot.

Bot uses SQLite database at host in ~/.devpoker_bot/devpoker_bot.db.

Credits

This project is inspired by the tg-planning-poker.

License

About CyberCog

CyberCog is a Social Unity of enthusiasts. Research the best solutions in product & software development is our passion.

CyberCog

telegram-devpoker-bot's People

Contributors

antonkomarev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

telegram-devpoker-bot's Issues

Add game phases

Phases:

  • Initiating phase
  • Voting phase
  • Result phase

Initiating phase

  • ready to start
  • let's discuss
  • start game (initiator only)

Voting phase

  • points
  • special cases
  • restart (initiator only)
  • end game (initiator only)

Result phase

  • re-vote (clone procedure, hide keyboard of source procedure)

Move environment variables to .env file

Right now bot is running using shell command:

DEVPOKER_BOT_API_TOKEN=11111424242:some-token ./run.sh

Need to move DEVPOKER_BOT_API_TOKEN variable to .env file in project root directory. To make it run like:

./run.sh

Send same message raises an API error

aiotg.bot.BotApiError: Bad Request: message is not modified: specified new message content and reply markup are exactly the same as a current content and reply markup of the message

Normalize Facilitator in database

Need to store users in separate database table and pass only facilitator_user_id and player_user_id in game_session and game tables.

Improve naming

Make naming consistent.

Game β€” is a planning poker game. Game contains of game sessions. Each session belongs to a topic (issue/task).

Game session phases

  • discussion
  • estimation
  • resolution

Initiator operations

  • start_estimation
  • end_estimation
  • clear_votes
  • re_estimate

Callbacks

  • discussion-vote-click-{topic_message_id}-{vote}
  • estimation-vote-click-{topic_message_id}-{vote}
  • {operation}-click-{topic_message_id}
    • start_estimation-click-{topic_message_id}
    • end_estimation-click-{topic_message_id}
    • clear_votes-click-{topic_message_id}
    • re_estimate-click-{topic_message_id}

Class types

  • Game
  • GameSession
  • GameRegistry
  • DiscussionVote
  • EstimationVote

Update system message text on editing facilitator message text

When source message text is edited we should edit it bot's system messages with this facilitator_message_id.

Need to choose between implementations:

  • update all messages related to facilitator_message_id
  • update only active sessions related to facilitator_message_id

Need to update Game & GameSession system messages.

Add planning sessions

Right now Game entity is what should be renamed to Session. And Game should become container of the Sessions.

There might be only one active Game in one Chat.

  • Game start
  • Game session attach
  • Game end
  • Game statistics

Planning Game Start

Command /game {game_name} starts game with provided name.

When game is starting, Bot sends a message:

Planning poker started: {game_name}

If {game_name} is empty β€” default name is (no game name).

If there is active game Bot should say that Game already started and you can't start a new one unless it's ended.

Planning Game Process

If Game in Chat is active β€” all Sessions will have game_id related to active Game.

If source message text is edited active Game message should be renamed as well.

Planning Game End

Command /game_end ends currently started Game.

When Game ends β€” Bot sends statistics:

  • Planning poker ended: {game_name}
  • Estimated topics count: {estimated_topics_count}
  • Canceled discussions count: {canceled_topics_count} (if count > 0)

Message should be sent with disable_web_page_preview=True.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.