mdsb100/cli-gitlab

showIssue doesn't work

meonkeys opened this issue · 3 comments

...or I'm just using it incorrectly.

gitlab showIssue meteor-iron-router-function-trace 1

should display this issue, right? That doesn't print out anything.

I`ll check it.

@meonkeys
Usage is not enough helpful, I will modify it clearly.
Now, please look to this. You should check the command 'showIssue'.
And I will move the command`s map to individual coffee.

gitlab issues
[
{
    "assignee": {
      "avatar_url": "http://gitlab.baidao.com//uploads/user/avatar/9/764b89699bcc946e4239b04f28002ce9.jpeg",
      "id": 9,
      "name": "Cao Jun",
      "state": "active",
      "username": "mdsb100"
    },
    "author": {
      "avatar_url": "http://gitlab.baidao.com//uploads/user/avatar/9/764b89699bcc946e4239b04f28002ce9.jpeg",
      "id": 9,
      "name": "Cao Jun",
      "state": "active",
      "username": "mdsb100"
    },
    "created_at": "2014-08-14T06:28:20.398Z",
    "description": "测试一下",
    "id": 2,
    "iid": 1,
    "labels": [
    ],
    "milestone": null,
    "project_id": 10,
    "state": "closed",
    "title": "Test Issue",
    "updated_at": "2014-08-15T10:25:31.588Z"
  }
]
gitlab showIssue 10 9

Inside code

"showIssue":
    param: [
      "<projectId>"
      "<issueId>"
    ]
    desc: "Get retrive issue fo a given project and a given issue."
    nameSpaces: "issues.show"
    callback: stringifyFormat
{
  "assignee": {
    "avatar_url": "http://www.gravatar.com/avatar/bc0d0584055d3ab3a671a12f1a329921?s=40&d=identicon",
    "id": 12,
    "name": "Bob",
    "state": "active",
    "username": "Bob"
  },
  "author": {
    "avatar_url": "http://www.gravatar.com/avatar/bc0d0584055d3ab3a671a12f1a329921?s=40&d=identicon",
    "id": 12,
    "name": "Bob",
    "state": "active",
    "username": "Bob"
  },
  "created_at": "2014-08-25T07:47:03.860Z",
  "description": "resume时偶尔崩溃\r\n\r\n退出登录时偶尔崩溃\r\n\r\n均无法每次重现。\r\n\r\n![1](http://gitlab.baidao.com/uploads/mobilerd/ytxmobile/f84bcf959e/1.png)\r\n",
  "id": 9,
  "iid": 6,
  "labels": [
    "bug"
  ],
  "milestone": null,
  "project_id": 10,
  "state": "closed",
  "title": "iOS莫名其妙crash",
  "updated_at": "2014-09-26T07:00:26.916Z"
}

By the way, it works work me.

Thank you, @mdsb100. I made two mistakes:

  1. I was using iid (nonunique issue "id") instead of id.
  2. I used the wrong projectId.

This works:

gitlab showIssue meonkeys/meteor-iron-router-function-trace 107956