A Slack bot that helps developers quickly see all their pending work across GitHub, Jira, and personal todos with a single command.
- Single Command: Type
/myworkin Slack to get a complete overview of ALL your work - GitHub Integration:
- PRs you created that are still open
- PRs waiting for your review
- PRs assigned to you
- PRs with failed CI checks (optional)
- Jira Integration:
- Issues assigned to you
- Categorized by status (To Do, In Progress, Blocked)
- Shows priority, summary, and direct links
- Personal TODO List β¨ NEW!:
- Add, edit, and track your personal todos
- Mark todos as complete
- View todos alongside your GitHub and Jira work
- Persistent storage per user
- Beautiful Formatting: Uses Slack Block Kit for a modern, readable interface
my-work-bot/
βββ src/
β βββ __init__.py
β βββ app.py # Main application entry point
β βββ slack/
β β βββ __init__.py
β β βββ bot.py # Slack bot implementation
β βββ github/
β β βββ __init__.py
β β βββ client.py # GitHub API client
β βββ jira/
β β βββ __init__.py
β β βββ client.py # Jira API client
β βββ storage/ # NEW: TODO storage
β β βββ __init__.py
β β βββ todo_store.py # Personal TODO management
β βββ utils/
β βββ __init__.py
β βββ formatter.py # Slack message formatter
βββ data/ # NEW: TODO data storage
β βββ todos.json # User todos (auto-created)
βββ run.py # Convenience runner script
βββ start_bot.sh # Quick start script
βββ requirements.txt # Python dependencies
βββ .env.example # Environment variables template
βββ .gitignore # Git ignore rules
βββ README.md # This file
- Python 3.8 or higher
- A Slack workspace where you can install apps
- GitHub personal access token
- Jira API token
cd my-work-bot# Create a virtual environment (recommended)
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install required packages
pip install -r requirements.txt- Go to api.slack.com/apps
- Click "Create New App" β "From scratch"
- Name it "My Work Bot" and select your workspace
- Navigate to OAuth & Permissions
- Under Bot Token Scopes, add:
commands- For slash commandschat:write- To send messagesapp_mentions:read- To respond to @mentions
- Navigate to Slash Commands
- Click "Create New Command"
- Set:
- Command:
/mywork - Request URL:
https://your-domain.com/slack/events(or use ngrok for local dev) - Short Description: "View your pending work from GitHub and Jira"
- Usage Hint: (leave empty)
- Command:
- Navigate to Socket Mode
- Enable Socket Mode
- Generate an app-level token with
connections:writescope - Save this as
SLACK_APP_TOKEN
- Navigate to Install App
- Click "Install to Workspace"
- Authorize the app
- Copy the Bot User OAuth Token (starts with
xoxb-)
- Go to github.com/settings/tokens
- Click "Generate new token (classic)"
- Select scopes:
repo- Full control of private repositoriesread:org- Read org and team membership
- Generate and copy the token
- Go to id.atlassian.com/manage-profile/security/api-tokens
- Click "Create API token"
- Give it a label (e.g., "My Work Bot")
- Copy the token
Create a .env file in the project root:
# Slack Configuration
SLACK_BOT_TOKEN=xoxb-your-bot-token-here
SLACK_SIGNING_SECRET=your-signing-secret-here
SLACK_APP_TOKEN=xapp-your-app-token-here
SLASH_COMMAND=/mywork
# GitHub Configuration
GITHUB_TOKEN=ghp_your_github_token_here
GITHUB_ORG=your-organization-name
GITHUB_USERNAME=your-github-username
GITHUB_REPOS=repo1,repo2,repo3 # Optional: leave empty to check all repos
# Jira Configuration
JIRA_EMAIL=your-email@company.com
JIRA_API_TOKEN=your-jira-api-token-here
JIRA_BASE_URL=https://your-company.atlassian.netpython run.pyYou should see:
==================================================
π€ Starting My Work Bot for Developer Week
==================================================
β
GitHub integration enabled
β
Jira integration enabled
==================================================
β‘οΈ Bot is running in Socket Mode with command: /mywork
- Open Slack
- Type
/myworkin any channel - The bot will fetch and display your pending work!
- Try the TODO commands:
/todo add Prepare for Developer Week/todo list/mywork(see todos alongside GitHub and Jira!)
The bot includes a personal TODO list feature to help you track tasks that don't belong in GitHub or Jira:
/todo # Show help
/todo add <description> # Add a new todo
/todo list # Show all your todos
/todo done <id> # Mark a todo as complete
/todo delete <id> # Delete a todo
/todo edit <id> <description> # Edit a todo
/todo add Review PR #123 by EOD
/todo add Update documentation for new API
/todo done 3
/todo edit 1 Review PR #123 AND merge if approved
/todo list
Your todos are stored locally in data/todos.json and are never shared with other users.
| Variable | Required | Description |
|---|---|---|
SLACK_BOT_TOKEN |
Yes | Bot user OAuth token from Slack |
SLACK_SIGNING_SECRET |
Yes | Signing secret from Slack app settings |
SLACK_APP_TOKEN |
No* | App-level token (required for Socket Mode) |
SLASH_COMMAND |
No | Custom slash command (default: /mywork) |
GITHUB_TOKEN |
No** | GitHub personal access token |
GITHUB_ORG |
No | GitHub organization to filter |
GITHUB_USERNAME |
No** | Your GitHub username |
GITHUB_REPOS |
No | Comma-separated list of repos to monitor |
JIRA_EMAIL |
No** | Your Jira account email |
JIRA_API_TOKEN |
No** | Jira API token |
JIRA_BASE_URL |
No** | Your Jira instance URL |