{"action":"created","comment":{"url":"https://api.github.com/repos/Microsoft/tfs-cli/pulls/comments/39034396","id":39034396,"diff_hunk":"@@ -0,0 +1,90 @@\n+import cmdm = require('../lib/tfcommand');\n+import cm = require('../lib/common');\n+import witifm = require('vso-node-api/interfaces/WorkItemTrackingInterfaces');\n+import VSSInterfaces = require('vso-node-api/interfaces/common/VSSInterfaces');\n+import witm = require('vso-node-api/WorkItemTrackingApi');\n+import argm = require('../lib/arguments');\n+var trace = require('../lib/trace');\n+\n+export function describe(): string {\n+    return 'create a workitem';\n+}\n+\n+export function getCommand(): cmdm.TfCommand {\n+    // this just offers description for help and to offer sub commands\n+    return new WorkItemCreate;\n+}\n+\n+// requires auth, connect etc...\n+export var isServerOperation: boolean = true;\n+\n+// unless you have a good reason, should not hide\n+export var hideBanner: boolean = false;\n+\n+export class WorkItemCreate extends cmdm.TfCommand {\n+    \n+    requiredArguments = [argm.PROJECT_NAME, argm.WORKITEMTYPE, argm.TITLE];\n+    optionalArguments = [argm.ASSIGNEDTO, argm.DESCRIPTION];\n+    \n+    public exec(args: string[], options: cm.IOptions): any {\n+        trace('workitem-create.exec');\n+        var witapi: witm.IQWorkItemTrackingApi = this.getWebApi().getQWorkItemTrackingApi();\n+        \n+        return this.promptArguments(this.requiredArguments, this.optionalArguments).then( (allArguments) => {","path":"app/exec/workitem-create.ts","position":33,"original_position":33,"commit_id":"251629e9057870540cbf0755cfa52ed2f55a7e1d","original_commit_id":"251629e9057870540cbf0755cfa52ed2f55a7e1d","user":{"login":"bryanmacfarlane","id":919564,"avatar_url":"https://avatars.githubusercontent.com/u/919564?v=3","gravatar_id":"","url":"https://api.github.com/users/bryanmacfarlane","html_url":"https://github.com/bryanmacfarlane","followers_url":"https://api.github.com/users/bryanmacfarlane/followers","following_url":"https://api.github.com/users/bryanmacfarlane/following{/other_user}","gists_url":"https://api.github.com/users/bryanmacfarlane/gists{/gist_id}","starred_url":"https://api.github.com/users/bryanmacfarlane/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bryanmacfarlane/subscriptions","organizations_url":"https://api.github.com/users/bryanmacfarlane/orgs","repos_url":"https://api.github.com/users/bryanmacfarlane/repos","events_url":"https://api.github.com/users/bryanmacfarlane/events{/privacy}","received_events_url":"https://api.github.com/users/bryanmacfarlane/received_events","type":"User","site_admin":false},"body":"Also - just to make sure - if I supply the args on the cmd line, it won't prompt correct?  (that was one of the initial goals)","created_at":"2015-09-09T12:11:39Z","updated_at":"2015-09-09T12:11:39Z","html_url":"https://github.com/Microsoft/tfs-cli/pull/32#discussion_r39034396","pull_request_url":"https://api.github.com/repos/Microsoft/tfs-cli/pulls/32","_links":{"self":{"href":"https://api.github.com/repos/Microsoft/tfs-cli/pulls/comments/39034396"},"html":{"href":"https://github.com/Microsoft/tfs-cli/pull/32#discussion_r39034396"},"pull_request":{"href":"https://api.github.com/repos/Microsoft/tfs-cli/pulls/32"}}},"pull_request":{"url":"https://api.github.com/repos/Microsoft/tfs-cli/pulls/32","id":44381192,"html_url":"https://github.com/Microsoft/tfs-cli/pull/32","diff_url":"https://github.com/Microsoft/tfs-cli/pull/32.diff","patch_url":"https://github.com/Microsoft/tfs-cli/pull/32.patch","issue_url":"https://api.github.com/repos/Microsoft/tfs-cli/issues/32","number":32,"state":"open","locked":false,"title":"Add initial set of Work Item commands","user":{"login":"mmanela","id":304410,"avatar_url":"https://avatars.githubusercontent.com/u/304410?v=3","gravatar_id":"","url":"https://api.github.com/users/mmanela","html_url":"https://github.com/mmanela","followers_url":"https://api.github.com/users/mmanela/followers","following_url":"https://api.github.com/users/mmanela/following{/other_user}","gists_url":"https://api.github.com/users/mmanela/gists{/gist_id}","starred_url":"https://api.github.com/users/mmanela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmanela/subscriptions","organizations_url":"https://api.github.com/users/mmanela/orgs","repos_url":"https://api.github.com/users/mmanela/repos","events_url":"https://api.github.com/users/mmanela/events{/privacy}","received_events_url":"https://api.github.com/users/mmanela/received_events","type":"User","site_admin":false},"body":"This PR adds workitem **show**, **query** and **create**\r\n\r\n**show** - This takes a work item id and print out details about the work item\r\n**query** - This lets you pass WIQL and see the results\r\n**create** - This asks for some basic fields and then creates the work item","created_at":"2015-09-07T22:19:36Z","updated_at":"2015-09-09T12:11:39Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0aafbca1f2a516d6dd2efebdcad197e1922c619","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Microsoft/tfs-cli/pulls/32/commits","review_comments_url":"https://api.github.com/repos/Microsoft/tfs-cli/pulls/32/comments","review_comment_url":"https://api.github.com/repos/Microsoft/tfs-cli/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Microsoft/tfs-cli/issues/32/comments","statuses_url":"https://api.github.com/repos/Microsoft/tfs-cli/statuses/251629e9057870540cbf0755cfa52ed2f55a7e1d","head":{"label":"mmanela:master","ref":"master","sha":"251629e9057870540cbf0755cfa52ed2f55a7e1d","user":{"login":"mmanela","id":304410,"avatar_url":"https://avatars.githubusercontent.com/u/304410?v=3","gravatar_id":"","url":"https://api.github.com/users/mmanela","html_url":"https://github.com/mmanela","followers_url":"https://api.github.com/users/mmanela/followers","following_url":"https://api.github.com/users/mmanela/following{/other_user}","gists_url":"https://api.github.com/users/mmanela/gists{/gist_id}","starred_url":"https://api.github.com/users/mmanela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmanela/subscriptions","organizations_url":"https://api.github.com/users/mmanela/orgs","repos_url":"https://api.github.com/users/mmanela/repos","events_url":"https://api.github.com/users/mmanela/events{/privacy}","received_events_url":"https://api.github.com/users/mmanela/received_events","type":"User","site_admin":false},"repo":{"id":40687566,"name":"tfs-cli","full_name":"mmanela/tfs-cli","owner":{"login":"mmanela","id":304410,"avatar_url":"https://avatars.githubusercontent.com/u/304410?v=3","gravatar_id":"","url":"https://api.github.com/users/mmanela","html_url":"https://github.com/mmanela","followers_url":"https://api.github.com/users/mmanela/followers","following_url":"https://api.github.com/users/mmanela/following{/other_user}","gists_url":"https://api.github.com/users/mmanela/gists{/gist_id}","starred_url":"https://api.github.com/users/mmanela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mmanela/subscriptions","organizations_url":"https://api.github.com/users/mmanela/orgs","repos_url":"https://api.github.com/users/mmanela/repos","events_url":"https://api.github.com/users/mmanela/events{/privacy}","received_events_url":"https://api.github.com/users/mmanela/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mmanela/tfs-cli","description":"TFS Cross Platform Command Line","fork":true,"url":"https://api.github.com/repos/mmanela/tfs-cli","forks_url":"https://api.github.com/repos/mmanela/tfs-cli/forks","keys_url":"https://api.github.com/repos/mmanela/tfs-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mmanela/tfs-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mmanela/tfs-cli/teams","hooks_url":"https://api.github.com/repos/mmanela/tfs-cli/hooks","issue_events_url":"https://api.github.com/repos/mmanela/tfs-cli/issues/events{/number}","events_url":"https://api.github.com/repos/mmanela/tfs-cli/events","assignees_url":"https://api.github.com/repos/mmanela/tfs-cli/assignees{/user}","branches_url":"https://api.github.com/repos/mmanela/tfs-cli/branches{/branch}","tags_url":"https://api.github.com/repos/mmanela/tfs-cli/tags","blobs_url":"https://api.github.com/repos/mmanela/tfs-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mmanela/tfs-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mmanela/tfs-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/mmanela/tfs-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mmanela/tfs-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/mmanela/tfs-cli/languages","stargazers_url":"https://api.github.com/repos/mmanela/tfs-cli/stargazers","contributors_url":"https://api.github.com/repos/mmanela/tfs-cli/contributors","subscribers_url":"https://api.github.com/repos/mmanela/tfs-cli/subscribers","subscription_url":"https://api.github.com/repos/mmanela/tfs-cli/subscription","commits_url":"https://api.github.com/repos/mmanela/tfs-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/mmanela/tfs-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/mmanela/tfs-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/mmanela/tfs-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/mmanela/tfs-cli/contents/{+path}","compare_url":"https://api.github.com/repos/mmanela/tfs-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mmanela/tfs-cli/merges","archive_url":"https://api.github.com/repos/mmanela/tfs-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mmanela/tfs-cli/downloads","issues_url":"https://api.github.com/repos/mmanela/tfs-cli/issues{/number}","pulls_url":"https://api.github.com/repos/mmanela/tfs-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/mmanela/tfs-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/mmanela/tfs-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mmanela/tfs-cli/labels{/name}","releases_url":"https://api.github.com/repos/mmanela/tfs-cli/releases{/id}","created_at":"2015-08-14T00:16:19Z","updated_at":"2015-08-14T00:16:20Z","pushed_at":"2015-09-07T22:17:11Z","git_url":"git://github.com/mmanela/tfs-cli.git","ssh_url":"git@github.com:mmanela/tfs-cli.git","clone_url":"https://github.com/mmanela/tfs-cli.git","svn_url":"https://github.com/mmanela/tfs-cli","homepage":null,"size":855,"stargazers_count":0,"watchers_count":0,"language":"TypeScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Microsoft:master","ref":"master","sha":"39d88b9d9dbac8c7f84f354e3d2fa9e722ac5506","user":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"repo":{"id":39497254,"name":"tfs-cli","full_name":"Microsoft/tfs-cli","owner":{"login":"Microsoft","id":6154722,"avatar_url":"https://avatars.githubusercontent.com/u/6154722?v=3","gravatar_id":"","url":"https://api.github.com/users/Microsoft","html_url":"https://github.com/Microsoft","followers_url":"https://api.github.com/users/Microsoft/followers","following_url":"https://api.github.com/users/Microsoft/following{/other_user}","gists_url":"https://api.github.com/users/Microsoft/gists{/gist_id}","starred_url":"https://api.github.com/users/Microsoft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Microsoft/subscriptions","organizations_url":"https://api.github.com/users/Microsoft/orgs","repos_url":"https://api.github.com/users/Microsoft/repos","events_url":"https://api.github.com/users/Microsoft/events{/privacy}","received_events_url":"https://api.github.com/users/Microsoft/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Microsoft/tfs-cli","description":"TFS Cross Platform Command Line","fork":false,"url":"https://api.github.com/repos/Microsoft/tfs-cli","forks_url":"https://api.github.com/repos/Microsoft/tfs-cli/forks","keys_url":"https://api.github.com/repos/Microsoft/tfs-cli/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Microsoft/tfs-cli/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Microsoft/tfs-cli/teams","hooks_url":"https://api.github.com/repos/Microsoft/tfs-cli/hooks","issue_events_url":"https://api.github.com/repos/Microsoft/tfs-cli/issues/events{/number}","events_url":"https://api.github.com/repos/Microsoft/tfs-cli/events","assignees_url":"https://api.github.com/repos/Microsoft/tfs-cli/assignees{/user}","branches_url":"https://api.github.com/repos/Microsoft/tfs-cli/branches{/branch}","tags_url":"https://api.github.com/repos/Microsoft/tfs-cli/tags","blobs_url":"https://api.github.com/repos/Microsoft/tfs-cli/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Microsoft/tfs-cli/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Microsoft/tfs-cli/git/refs{/sha}","trees_url":"https://api.github.com/repos/Microsoft/tfs-cli/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Microsoft/tfs-cli/statuses/{sha}","languages_url":"https://api.github.com/repos/Microsoft/tfs-cli/languages","stargazers_url":"https://api.github.com/repos/Microsoft/tfs-cli/stargazers","contributors_url":"https://api.github.com/repos/Microsoft/tfs-cli/contributors","subscribers_url":"https://api.github.com/repos/Microsoft/tfs-cli/subscribers","subscription_url":"https://api.github.com/repos/Microsoft/tfs-cli/subscription","commits_url":"https://api.github.com/repos/Microsoft/tfs-cli/commits{/sha}","git_commits_url":"https://api.github.com/repos/Microsoft/tfs-cli/git/commits{/sha}","comments_url":"https://api.github.com/repos/Microsoft/tfs-cli/comments{/number}","issue_comment_url":"https://api.github.com/repos/Microsoft/tfs-cli/issues/comments{/number}","contents_url":"https://api.github.com/repos/Microsoft/tfs-cli/contents/{+path}","compare_url":"https://api.github.com/repos/Microsoft/tfs-cli/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Microsoft/tfs-cli/merges","archive_url":"https://api.github.com/repos/Microsoft/tfs-cli/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Microsoft/tfs-cli/downloads","issues_url":"https://api.github.com/repos/Microsoft/tfs-cli/issues{/number}","pulls_url":"https://api.github.com/repos/Microsoft/tfs-cli/pulls{/number}","milestones_url":"https://api.github.com/repos/Microsoft/tfs-cli/milestones{/number}","notifications_url":"https://api.github.com/repos/Microsoft/tfs-cli/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Microsoft/tfs-cli/labels{/name}","releases_url":"https://api.github.com/repos/Microsoft/tfs-cli/releases{/id}","created_at":"2015-07-22T09:23:42Z","updated_at":"2015-09-01T06:14:39Z","pushed_at":"2015-09-09T09:58:16Z","git_url":"git://github.com/Microsoft/tfs-cli.git","ssh_url":"git@github.com:Microsoft/tfs-cli.git","clone_url":"https://github.com/Microsoft/tfs-cli.git","svn_url":"https://github.com/Microsoft/tfs-cli","homepage":null,"size":1414,"stargazers_count":21,"watchers_count":21,"language":"TypeScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":6,"forks":6,"open_issues":6,"watchers":21,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Microsoft/tfs-cli/pulls/32"},"html":{"href":"https://github.com/Microsoft/tfs-cli/pull/32"},"issue":{"href":"https://api.github.com/repos/Microsoft/tfs-cli/issues/32"},"comments":{"href":"https://api.github.com/repos/Microsoft/tfs-cli/issues/32/comments"},"review_comments":{"href":"https://api.github.com/repos/Microsoft/tfs-cli/pulls/32/comments"},"review_comment":{"href":"https://api.github.com/repos/Microsoft/tfs-cli/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Microsoft/tfs-cli/pulls/32/commits"},"statuses":{"href":"https://api.github.com/repos/Microsoft/tfs-cli/statuses/251629e9057870540cbf0755cfa52ed2f55a7e1d"}}}}