All Projects → xmunoz → Bugzilla2gitlab

xmunoz / Bugzilla2gitlab

Licence: mit
An issue migrator

Programming Languages

python
139335 projects - #7 most used programming language

Labels

Projects that are alternatives of or similar to Bugzilla2gitlab

Gitlab4j Api
GitLab4J API (gitlab4j-api) provides a full featured Java client library for working with GitLab repositories via the GitLab REST API
Stars: ✭ 545 (+2170.83%)
Mutual labels:  gitlab
Op Note
当我有服务器时我做了什么 · 个人服务器运维指南
Stars: ✭ 733 (+2954.17%)
Mutual labels:  gitlab
Git Repo
Git-Repo: CLI utility to manage git services from your workspace
Stars: ✭ 818 (+3308.33%)
Mutual labels:  gitlab
Gitlab Ce Zh
GitLab Community Edition (中文社区版)
Stars: ✭ 594 (+2375%)
Mutual labels:  gitlab
Gitea
Git with a cup of tea, painless self-hosted git service
Stars: ✭ 27,320 (+113733.33%)
Mutual labels:  gitlab
Client
GitLab API v4 client for PHP
Stars: ✭ 763 (+3079.17%)
Mutual labels:  gitlab
Kanban
Lean project management for GitLab
Stars: ✭ 499 (+1979.17%)
Mutual labels:  gitlab
Octohint
The missing IntelliSense hint for GitHub and GitLab
Stars: ✭ 906 (+3675%)
Mutual labels:  gitlab
Gitlab Mirrors
A set of scripts adding the ability of managing remote mirrors to GitLab.
Stars: ✭ 719 (+2895.83%)
Mutual labels:  gitlab
Scala Steward
🤖 A bot that helps you keep your Scala projects up-to-date
Stars: ✭ 812 (+3283.33%)
Mutual labels:  gitlab
Webhooks
🎣 Webhook receiver for GitHub, Bitbucket, GitLab, Gogs
Stars: ✭ 601 (+2404.17%)
Mutual labels:  gitlab
Git Touch
An open-source app for GitHub, GitLab, Bitbucket, Gitea, and Gitee(码云), built with Flutter
Stars: ✭ 663 (+2662.5%)
Mutual labels:  gitlab
Agola
Agola: CI/CD Redefined
Stars: ✭ 783 (+3162.5%)
Mutual labels:  gitlab
Gitlabhq
GitLab CE Mirror | Please open new issues in our issue tracker on GitLab.com
Stars: ✭ 22,798 (+94891.67%)
Mutual labels:  gitlab
Tutoriel Gitlab
Tutoriel GitLab en Français
Stars: ✭ 17 (-29.17%)
Mutual labels:  gitlab
Renovate
Universal dependency update tool that fits into your workflows.
Stars: ✭ 6,700 (+27816.67%)
Mutual labels:  gitlab
Gitbeaker
🤖 GitLab API NodeJS library with full support of all the Gitlab API services.
Stars: ✭ 755 (+3045.83%)
Mutual labels:  gitlab
Gitlab Docker Letsencrypt
Gitlab CE + Docker Compose + Let's Encrypt (auto generate/renew)
Stars: ✭ 22 (-8.33%)
Mutual labels:  gitlab
Owasp Threat Dragon Gitlab
OWASP Threat Dragon with Gitlab Integration
Stars: ✭ 17 (-29.17%)
Mutual labels:  gitlab
Opscloud
运维管理平台(阿里云),自动同步阿里云配置信息,堡垒机(容器),批量运维,Kubernetes,Zabbix管理等功能
Stars: ✭ 788 (+3183.33%)
Mutual labels:  gitlab

PyPI version Build Status

bugzilla2gitlab

Introduction

This is a tool for developers or admins who want to migrate the issue management for their software project from Bugzilla to Gitlab Issues. Here is a screenshoot of an issue created by bugzilla2gitlab: bugzilla2gitlab created issue

bugzilla2gitlab copies over bugs, bug comments and attachments.

Installation

This library is very much under development. That said, if you like to feel the wind in your hair, simply pip install bugzilla2gitlab.

More than likely, you will need to roll up your sleaves and hack on the package to achieve a migration that you are happy with. In this case:

git clone [email protected]:xmunoz/bugzilla2gitlab.git
cd bugzilla2gitlab
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
# installs this package locally
pip install .

bugzilla2gitlab is compatible with python3.5, 3.6, 3.7, and 3.8.

Usage

bugzilla2gitlab synchronously migrates a user-defined list of bugzilla bugs to a single GitLab project. There are two interfaces for this library. The command line usage:

$  bin/bugzilla2gitlab -h
usage: bugzilla2gitlab [-h] [FILE] [CONFIG_DIRECTORY]

Migrate bugs from Bugzilla to GitLab Issues.

positional arguments:
  [FILE]              A file containing a list of Bugzilla bug numbers to
                      migrate, one per line.
  [CONFIG_DIRECTORY]  The directory containing the required configuration
                      files.

optional arguments:
  -h, --help          show this help message and exit

This package can also be used as a python module.

from bugzilla2gitlab import Migrator

client = Migrator(config_path="/path/to/config")
bugs_list = [1,2,3,4,5,6,7]
client.migrate(bugs_list)

Configuration

To begin using bugzilla2gitlab, the following list of configuration files is required in the specified config directory:

  • defaults.yml: Core default values used throughout the modules.
  • user_mappings.yml: key, value pairs of Bugzilla usernames to GitLab users
  • component_mappings.yml: key, value pairs of Bugzilla components to Gitlab labels

Samples of all of these files with documentation for each configuration variable can be found in tests/test_data/config.

bugzilla2gitlab creates issues and comments in GitLab with the user accounts specified in user_mappings.yml, perserving the integrity of the original Bugzilla commenter. This, however, may not always be possible. In tests/test_data/config/user_mappings.yml, users with the designation "bugzilla" may have left the organization and therefore not have current GitLab accounts, or might simply be machine users. Comments for such users will be left under a generic "bugzilla" account. bugzilla2gitlab doesn't create any new user accounts. All of the accounts specified in user_mappings.yml must already exist in your GitLab installation.

The default table created in the issue description by bugzilla2gitlab looks like this:

Bugzilla Link 570755
Created on Jun 08, 2010 10:25
Version unspecified
OS All
Architecture All
Attachments a_PHP_play_script_to_demonstrate_how_the_browser_requests_videos
Reporter mozilla

To modify this table, take a look at create_description in models.py.

How it works

GitLab

Gitlab has a comprehensive and extensively documented API. Here are the main endpoints that this library makes use of.

Calls to the Gitlab API must be made with an administrator private token in order to impersonate other users.

Bugzilla

This program relies on being able to fetch bug data by simply appending &ctype=xml to the end of the bugzilla bug url, and then parsing the resultant xml. If this trick doesn't work on your bugzilla installation, then bugzilla2gitlab probably won't work for you.

Caveats

Every comment or mention in GitLab typically sends a notification. This is true even for comments/issues created programatically. To avoid users inboxes being flooded with meaningless email notifications and avoid overwhelming your SMTP servers, GitLab users should disable all email notifications (global and group-specific) just prior to the running of this script. This can be done through the gitlab UI.

Further, this tools requires Gitlab sudo. If you need a tool that works without sudo, take a look at FreeDesktop's migration tool.

Demo

If you want to test out this library on a non-production GitLab instance, I recommend starting up a one-click GitLab droplet from DigitalOcean. From there, you can create a code repository, add some user accounts, and take bugzilla2gitlab for a spin.

Contributing

Check out CONTRIBUTING.md.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].