Giter Site home page Giter Site logo

jpangas / bugbot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from mozilla/bugbot

0.0 0.0 0.0 2.4 MB

A Mozilla release management tool to send reminders to Firefox developers and improve Bugzilla metadata

License: BSD 3-Clause "New" or "Revised" License

Shell 1.33% Python 87.19% HTML 10.96% Mako 0.06% Jinja 0.46%

bugbot's Introduction

This tool is used by Mozilla release management to send emails to the Firefox developers. It will query the bugzilla.mozilla.org database and send emails to Mozilla developers and their managers (if Mozilla staff).

The tool will also notify release managers about potential issues in bugzilla and autofix some categories of issues.

The list of checkers is documented on the Mozilla wiki: https://wiki.mozilla.org/BugBot

This package currently uses Mozilla's Bugzilla REST API, and the Mozilla IAM phonebook (to access bug assignees' managers & Mozilla email addresses).

Installation

  1. Check out the code:

    git clone https://github.com/mozilla/bugbot.git
    
  2. (optional) Create your virtualenv using virtualenvwrapper:

    virtualenv -p python3 venv
    source venv/bin/activate
    
  3. Install the dependencies for Python 3 too:

    pip install -r requirements.txt
    

Auto-formatting with pre-commit

This project uses pre-commit.

  1. Install test dependencies, if not already installed:

    pip install -r requirements-test.txt
    
  2. Set up the git pre-commit hooks in your clone:

    pre-commit install
    

Every time you try to commit, pre-commit checks your files to ensure they follow our style standards and aren't affected by some simple issues. If the checks fail, pre-commit won't let you commit.

Running the Bot Rules

Before running:

  1. The LDAP + SMTP infos are used to send emails
  2. Need to generate an API key from bugzilla admin ( https://bugzilla.mozilla.org/userprefs.cgi?tab=apikey )
  3. Should generate an API key from Phabricator ( https://phabricator.services.mozilla.com/settings/user )
  4. The IAM secrets are used to generate a dump of phonebook, which is required for some scripts (employees can request them by filing a bug in the SSO: Requests component )
# in configs/config.json
{
  "ldap_username": "[email protected]",
  "ldap_password": "xxxxxxxxxxxxxx",
  "smtp_server": "smtp.xxx.xxx",
  "smtp_port": 314,
  "smtp_ssl": true,
  "bz_api_key": "xxxxxxxxxxxxxx",
  "bz_api_key_nomail": "xxxxxxxxxxxxxx",
  "phab_api_key": "xxxxxxxxxxxxxx",
  "iam_client_secret": "xxxxxxxxxxxxxx",
  "iam_client_id": "xxxxxxxxxxxxxx",
  "socorro_token": "xxxxxxxxxxxxxx"
}
Do a dryrun::
python -m bugbot.rules.stalled

There is a ton of rules in bugbot/rules/ so you should be able to find some good examples.

Setting up 'Round Robin' triage rotations

One use case for this tool is managing triage of multiple components across a team of multiple people.

To set up a new Round Robin rotation, a manager or team lead should create a calendar with the rotation of triagers and add a link to the rotation calendar in the triage rotations spreadsheet.

Running on a server

This needs to run on a private server because it will have login for smtp and bugzilla key so it can't currently be shared access.

Cronjob:

CRON_DIR=/path/to/repository
00 12  * * 1-5 cd $CRON_DIR ; ./cron_run_weekdays.sh &> /tmp/bugbot-weekdays.log
00 8   * * *   cd $CRON_DIR ; ./cron_run_daily.sh    &> /tmp/bugbot-daily.log
40 */1 * * *   cd $CRON_DIR ; ./cron_run_hourly.sh   &> /tmp/bugbot-hourly.log

We run hourly jobs at minute 40 past every hour to avoid overlap with daily jobs.

bugbot's People

Contributors

suhaibmujahid avatar calixteman avatar sylvestre avatar dependabot[bot] avatar marco-c avatar lsblakk avatar dependabot-preview[bot] avatar anoopvalluthadam avatar jcristau avatar pyup-bot avatar legneato avatar emceeaich avatar anubnair avatar lothiraldan avatar mozfreddyb avatar globau avatar tomrittervg avatar svoisen avatar davehunt avatar daviddahl avatar pascalchevrel avatar promisefru avatar bbajaj avatar archaeopteryx avatar jensstutte avatar jpangas avatar mozilla-github-standards avatar padenot avatar tublitzed avatar shubham-s-del avatar

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.