mozilla / jira-bugzilla-integration

Jira Bugzilla Integration (JBI) - system to sync bugs and issues
Mozilla Public License 2.0
8 stars 22 forks source link

Status Sustain Build Docker image Run tests pre-commit

Jira Bugzilla Integration (JBI)

System to sync Bugzilla bugs to Jira issues.

Caveats

Note: whiteboard tags are string between brackets, and can have prefixes/suffixes using dashes (eg. [project], [project-fx-h2], [backlog-project]).

Diagram Overview

graph TD
    subgraph bugzilla services
        A[Bugzilla] -.-|bugzilla event| B[(Webhook Queue)]
        B --- C[Webhook Push Service]
    end
    D --> |create/update/delete issue| E[Jira]
    D<-->|read bug| A
    D -->|update see_also| A
    subgraph jira-bugzilla-integration
        C -.->|post /bugzilla_webhook| D{JBI}
        F["config.{ENV}.yaml"] ---| read actions config| D
    end

Documentation

Usage

How to onboard a new project?

  1. Submit configuration for your project

  2. Grant permissions to the Jira Automation Bot

    • If you are an admin of the Jira project

      • go to your Jira project and open Project Settings, then People.
      • Select Add People and search for Jira Automation. If two are listed select the one with the green logo
      • From the Roles drop down select Bots. Click Add 1 person.
      • Add these permissions for the bot
      "ADD_COMMENTS",
      "CREATE_ISSUES",
      "DELETE_ISSUES",
      "EDIT_ISSUES"
    • If you are not an admin of the Jira project, contact the admin or reach out to #jira-support in Slack to determine how best to request the changes described above

  3. Once your configuration is merged and a JBI release is deployed, create a bug in Bugzilla and add your whiteboard tag to the bug. Note that the tag must be enclosed in square brackets (eg. [famous-project]). You should see an issue appear in Jira

    • If you want to start syncing a bug to a Jira issue that already exists, add the issue's link to the See Also section of the Bugzilla bug before you add the whiteboard tag
  4. Verify that the action you took on the bug was property reflected on the Jira issue (e.g. the description was updated or a comment was added)

Development

We use pandoc to convert markdown to the Jira syntax. Make sure the binary is found in path or specify your custom location.

In order to pass arguments to pytest:

poetry run pytest -vv -k test_bugzilla_list_webhooks

You may consider: