a11n / RedmineCLI

[DEPRECATED] A Redmine client in NodeJS.
MIT License
21 stars 20 forks source link

Generate issues command #17

Closed pedropb closed 7 years ago

pedropb commented 7 years ago

Hi again!

I finally took some time to finish this implementation.

I created a new command called generate-issues that takes 2 parameters, <project> and <model>. The main objective of this command is to generate a set of issues from a predefined JSON model.

A common use case is:

We would then define a model called TDD.json like this:

{
    "globals": {
        "assignee": 1,
        "tracker": "Task"
    },
    "issues": [
        {"subject": "Define interfaces"},
        {"subject": "Write unit tests"},
        {"subject": "Write code to pass unit tests"},
        {"subject": "Refactor code"}
    ]
}

Then we would import the model into RedmineCLI: redmine import-model <path_to_TDD.json> TDD.

Finally we would generate the subtasks for the assigned parent issue: redmine generate-issues <project> TDD --parent 37.

Aside from generate-issues and import-model, there are also list-models and remove-model commands to provide all possible use-cases regarding model management.

I hope you like this new feature. It's proven to be very useful for me.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 41111f893cdcc630ea35358fc904b327b046a2e1 on pedrobaracho:generate-issues-command into 1ae33593b1788bdf852e6304b8a812b3503ad46f on a11n:master.

a11n commented 7 years ago

See #16