Todoplicator
Duplicate to-dos between popular to-do tools.
Todoplicator currently copies issue titles, bodies (or descriptions), and state (closed or open).
Installation
Add to Gemfile:
gem "todoplicator"
Then bundle:
$ bundle
Or install in system gems:
$ gem install todoplicator
Usage
Adapters
Below are the currently supported adapters. They are used to identify the source and destination for issues to be copied.
Class | Key | Target | Token |
---|---|---|---|
GitHubAdapter | github | username/repository | GITHUB_TOKEN |
GitLabAdapter | gitlab | username/repository | GITLAB_TOKEN |
Examples
For each adapter you plan on using you must have created a token that has permission to either read or write from the source or destination for issues to be copied.
Todoplicator must be installed and the appropriate authentication set via environment variable. There are multiple ways to set environment variables for applications.
The simplest approach is to export them before you run your script:
$ export GITHUB_TOKEN=abc123
Ruby
Copy from one GitHub repository to another:
require "todoplicator"
Todoplicator.new("github/jfine/todo-source", "github/jfine/todo-destination").copy
Copy from GitLab to GitHub repository:
require "todoplicator"
Todoplicator.new("gitlab/jfine/todo-source", "github/jfine/todo-destination").copy
Command line
Display help:
$ todoplicator -h
Copy from one GitHub repository to another:
$ todoplicator github/jfine/todo-source github/jfine/todo-destination
Copy from GitLab to GitHub repository:
$ todoplicator gitlab/jfine/todo-source github/jfine/todo-destination
Development
For an overview of considerations, thoughts, and general guidelines please see the issues below.
Although all commands can be run via bundle execute
several have been added as binstubs
for convenience and for use by tools such as RVM, direnv, etc.
bin/console
for starting an interactive promptbin/guard
for automatic running of specsbin/rake
for running other tasks including gem building and publishingbin/rspec
for running specsbin/rubocop
for code linting
Setup
$ git clone [email protected]:jfine/todoplicator.git
$ cd todoplicator
$ bin/setup
Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/jfine/todoplicator.
License
The gem is available as open source under the terms of the MIT License.