{"action":"created","comment":{"url":"https://api.github.com/repos/ef-ctx/tranor/pulls/comments/77792295","id":77792295,"diff_hunk":"@@ -0,0 +1,392 @@\n+// Copyright 2016 EF CTX. All rights reserved.\n+// Use of this source code is governed by a BSD-style\n+// license that can be found in the LICENSE file.\n+\n+package main\n+\n+import (\n+\t\"errors\"\n+\t\"fmt\"\n+\t\"io\"\n+\t\"net/http\"\n+\t\"net/url\"\n+\t\"sort\"\n+\t\"strings\"\n+\t\"time\"\n+\n+\t\"github.com/tsuru/gnuflag\"\n+\t\"github.com/tsuru/tsuru/cmd\"\n+\ttsuruerrors \"github.com/tsuru/tsuru/errors\"\n+)\n+\n+type projectCreate struct {\n+\tfs       *gnuflag.FlagSet\n+\tname     string\n+\tplatform string\n+\tteam     string\n+\tplan     string\n+\tenvs     commaSeparatedFlag\n+}\n+\n+func (*projectCreate) Info() *cmd.Info {\n+\treturn &cmd.Info{\n+\t\tName: \"project-create\",\n+\t\tDesc: \"creates a remote project in the tranor server\",\n+\t}\n+}\n+\n+func (c *projectCreate) Run(ctx *cmd.Context, client *cmd.Client) error {\n+\tif c.name == \"\" || c.platform == \"\" {\n+\t\treturn errors.New(\"please provide the name and the platform\")\n+\t}\n+\tconfig, err := loadConfigFile()\n+\tif err != nil {\n+\t\treturn errors.New(\"unable to load environments file, please make sure that tranor is properly configured\")\n+\t}\n+\terr = c.envs.validate(config.envNames())\n+\tif err != nil {\n+\t\treturn fmt.Errorf(\"failed to load environments: %s\", err)\n+\t}\n+\tenvs := c.filterEnvironments(config.Environments, c.envs.Values())\n+\tapps, err := c.createApps(envs, client)\n+\tif err != nil {\n+\t\treturn err\n+\t}\n+\terr = c.setCNames(apps, client)\n+\tif err != nil {\n+\t\tappNames := make([]string, len(apps))\n+\t\tfor i, app := range apps {\n+\t\t\tappNames[i] = app[\"name\"]\n+\t\t}\n+\t\tdeleteApps(appNames, client)\n+\t\treturn fmt.Errorf(\"failed to configure project %q: %s\", c.name, err)\n+\t}\n+\tfmt.Fprintf(ctx.Stdout, \"successfully created the project %q!\\n\", c.name)\n+\tif gitRepo := apps[0][\"repository_url\"]; gitRepo != \"\" {\n+\t\tfmt.Fprintf(ctx.Stdout, \"Git repository: %s\\n\", gitRepo)\n+\t}\n+\treturn nil\n+}\n+\n+func (c *projectCreate) Flags() *gnuflag.FlagSet {\n+\tif c.fs == nil {\n+\t\tc.fs = gnuflag.NewFlagSet(\"project-create\", gnuflag.ExitOnError)\n+\t\tc.fs.StringVar(&c.name, \"name\", \"\", \"name of the project\")\n+\t\tc.fs.StringVar(&c.name, \"n\", \"\", \"name of the project\")\n+\t\tc.fs.StringVar(&c.platform, \"platform\", \"\", \"platform of the project\")\n+\t\tc.fs.StringVar(&c.platform, \"l\", \"\", \"platform of the project\")\n+\t\tc.fs.StringVar(&c.team, \"team\", \"\", \"team that owns the project\")\n+\t\tc.fs.StringVar(&c.team, \"t\", \"\", \"team that owns the project\")\n+\t\tc.fs.StringVar(&c.plan, \"plan\", \"\", \"plan to use for the project\")\n+\t\tc.fs.StringVar(&c.plan, \"p\", \"\", \"plan to use for the project\")\n+\t\tc.fs.Var(&c.envs, \"envs\", \"comma-separated list of environments to use (defaults to dev,qa,stage,production)\")\n+\t\tc.fs.Var(&c.envs, \"e\", \"comma-separated list of environments to use (defaults to env,qa,stage,production)\")\n+\t\tc.envs.Set(\"dev,qa,stage,production\")\n+\t}\n+\treturn c.fs\n+}\n+\n+func (c *projectCreate) createApps(envs []Environment, client *cmd.Client) ([]map[string]string, error) {\n+\tcreatedApps := make([]map[string]string, 0, len(envs))\n+\tappNames := make([]string, 0, len(envs))\n+\tfor _, env := range envs {\n+\t\tappName := fmt.Sprintf(\"%s-%s\", c.name, env.Name)\n+\t\tapp, err := createApp(client, createAppOptions{\n+\t\t\tname:     appName,\n+\t\t\tplan:     c.plan,\n+\t\t\tplatform: c.platform,\n+\t\t\tpool:     env.poolName(),\n+\t\t\tteam:     c.team,\n+\t\t})\n+\t\tif err != nil {\n+\t\t\tdeleteApps(appNames, client)\n+\t\t\treturn nil, fmt.Errorf(\"failed to create the project in env %q: %s\", env.Name, err)\n+\t\t}\n+\t\tapp[\"name\"] = appName\n+\t\tapp[\"dnsSuffix\"] = env.DNSSuffix\n+\t\tcreatedApps = append(createdApps, app)\n+\t\tappNames = append(appNames, appName)\n+\t}\n+\treturn createdApps, nil\n+}\n+\n+func (c *projectCreate) setCNames(apps []map[string]string, client *cmd.Client) error {\n+\tfor _, app := range apps {\n+\t\treqURL, err := cmd.GetURL(fmt.Sprintf(\"/apps/%s/cname\", app[\"name\"]))\n+\t\tif err != nil {\n+\t\t\treturn err\n+\t\t}\n+\t\tcname := fmt.Sprintf(\"%s.%s\", c.name, app[\"dnsSuffix\"])\n+\t\tv := make(url.Values)\n+\t\tv.Set(\"cname\", cname)\n+\t\treq, err := http.NewRequest(\"POST\", reqURL, strings.NewReader(v.Encode()))\n+\t\tif err != nil {\n+\t\t\treturn err\n+\t\t}\n+\t\treq.Header.Set(\"Content-Type\", \"application/x-www-form-urlencoded\")\n+\t\tresp, err := client.Do(req)\n+\t\tif err != nil {\n+\t\t\treturn err\n+\t\t}\n+\t\tresp.Body.Close()\n+\t}\n+\treturn nil\n+}\n+\n+func (c *projectCreate) filterEnvironments(envs []Environment, names []string) []Environment {\n+\tvar filtered []Environment\n+\tfor _, e := range envs {\n+\t\tfor _, name := range names {\n+\t\t\tif e.Name == name {\n+\t\t\t\tfiltered = append(filtered, e)\n+\t\t\t\tbreak\n+\t\t\t}\n+\t\t}\n+\t}\n+\treturn filtered\n+}\n+\n+type commaSeparatedFlag struct {\n+\tvalues []string\n+}\n+\n+func (f *commaSeparatedFlag) Values() []string {\n+\treturn f.values\n+}\n+\n+func (f *commaSeparatedFlag) String() string {\n+\treturn strings.Join(f.values, \",\")\n+}\n+\n+func (f *commaSeparatedFlag) Set(v string) error {\n+\tf.values = strings.Split(v, \",\")\n+\treturn nil\n+}\n+\n+func (f *commaSeparatedFlag) validate(validValues []string) error {\n+\tvar invalidValues []string\n+\tfor _, cv := range f.values {\n+\t\tvar found bool\n+\t\tfor _, validValue := range validValues {\n+\t\t\tif validValue == cv {\n+\t\t\t\tfound = true\n+\t\t\t\tbreak\n+\t\t\t}\n+\t\t}\n+\t\tif !found {\n+\t\t\tinvalidValues = append(invalidValues, cv)\n+\t\t}\n+\t}\n+\tif len(invalidValues) > 0 {\n+\t\treturn fmt.Errorf(\"invalid values: %s (valid options are: %s)\", strings.Join(invalidValues, \", \"), strings.Join(validValues, \", \"))\n+\t}\n+\treturn nil\n+}\n+\n+type projectRemove struct {\n+\tcmd.ConfirmationCommand\n+\tname string\n+\tfs   *gnuflag.FlagSet\n+}\n+\n+func (c *projectRemove) Info() *cmd.Info {\n+\treturn &cmd.Info{\n+\t\tName: \"project-remove\",\n+\t\tDesc: \"removes the given project\",\n+\t}\n+}\n+\n+func (c *projectRemove) Run(ctx *cmd.Context, client *cmd.Client) error {\n+\tif c.name == \"\" {\n+\t\treturn errors.New(\"please provide the name of the project\")\n+\t}\n+\tconfig, err := loadConfigFile()\n+\tif err != nil {\n+\t\treturn errors.New(\"unable to load environments file, please make sure that tranor is properly configured\")\n+\t}\n+\tif !c.Confirm(ctx, fmt.Sprintf(\"Are you sure you want to remove the project %q?\", c.name)) {\n+\t\treturn nil\n+\t}\n+\tenvNames := config.envNames()\n+\tappNames := make([]string, len(envNames))\n+\tfor i, envName := range envNames {\n+\t\tappNames[i] = fmt.Sprintf(\"%s-%s\", c.name, envName)\n+\t}\n+\terrs, err := deleteApps(appNames, client)\n+\tif err != nil {\n+\t\treturn err\n+\t}\n+\tvar notFound int\n+\tfor _, err := range errs {\n+\t\tif err != nil {\n+\t\t\tif e, ok := err.(*tsuruerrors.HTTP); ok && e.Code == http.StatusNotFound {\n+\t\t\t\tnotFound++\n+\t\t\t}\n+\t\t}\n+\t}\n+\tif notFound == len(errs) {\n+\t\treturn errors.New(\"project not found\")\n+\t}\n+\tfmt.Fprintln(ctx.Stdout, \"Project successfully removed!\")\n+\treturn nil\n+}\n+\n+func (c *projectRemove) Flags() *gnuflag.FlagSet {\n+\tif c.fs == nil {\n+\t\tc.fs = c.ConfirmationCommand.Flags()\n+\t\tc.fs.StringVar(&c.name, \"name\", \"\", \"name of the project to b remove\")\n+\t\tc.fs.StringVar(&c.name, \"n\", \"\", \"name of the project to remove\")\n+\t}\n+\treturn c.fs\n+}\n+\n+type projectInfo struct {\n+\tname string\n+\tfs   *gnuflag.FlagSet\n+}\n+\n+func (c *projectInfo) Info() *cmd.Info {\n+\treturn &cmd.Info{\n+\t\tName: \"project-info\",\n+\t}\n+}\n+\n+func (c *projectInfo) Run(ctx *cmd.Context, client *cmd.Client) error {\n+\tif c.name == \"\" {\n+\t\treturn errors.New(\"please provide the name of the project\")\n+\t}\n+\tapps, err := c.projectApps(client)\n+\tif err != nil {\n+\t\treturn err\n+\t}\n+\tfmt.Fprintf(ctx.Stdout, \"Project name: %s\\n\\n\", c.name)\n+\tvar envs cmd.Table\n+\tenvs.Headers = cmd.Row{\"Environment\", \"Address\", \"Version\", \"Deploy date\"}\n+\tfor _, app := range apps {\n+\t\trow := cmd.Row{app.Env.Name, app.Addr, \"\", \"\"}\n+\t\tif deploy, err := lastDeploy(client, app.Name); err == nil && deploy.Image != \"\" {\n+\t\t\trow[2] = deploy.Image\n+\t\t\trow[3] = deploy.Timestamp.Format(time.RFC1123)\n+\t\t}\n+\t\tenvs.AddRow(row)\n+\t}\n+\tctx.Stdout.Write(envs.Bytes())\n+\treturn nil\n+}\n+\n+func (c *projectInfo) projectApps(client *cmd.Client) ([]app, error) {\n+\tconfig, err := loadConfigFile()\n+\tif err != nil {\n+\t\treturn nil, errors.New(\"unable to load environments file, please make sure that tranor is properly configured\")\n+\t}\n+\tapps, err := listApps(client, map[string]string{\"name\": c.name})\n+\tif err != nil {\n+\t\treturn nil, err\n+\t}\n+\tvar projectApps []app","path":"project.go","position":286,"original_position":286,"commit_id":"c9c9e59b21db79a6d97a3ecc20d12532fd0b3d25","original_commit_id":"dafc3768ddf5e3d1cd4e72f9bc25c195b1e5cde4","user":{"login":"tatiana","id":272048,"avatar_url":"https://avatars.githubusercontent.com/u/272048?v=3","gravatar_id":"","url":"https://api.github.com/users/tatiana","html_url":"https://github.com/tatiana","followers_url":"https://api.github.com/users/tatiana/followers","following_url":"https://api.github.com/users/tatiana/following{/other_user}","gists_url":"https://api.github.com/users/tatiana/gists{/gist_id}","starred_url":"https://api.github.com/users/tatiana/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tatiana/subscriptions","organizations_url":"https://api.github.com/users/tatiana/orgs","repos_url":"https://api.github.com/users/tatiana/repos","events_url":"https://api.github.com/users/tatiana/events{/privacy}","received_events_url":"https://api.github.com/users/tatiana/received_events","type":"User","site_admin":false},"body":"sorry, @Lepthy, what does this mean?","created_at":"2016-09-07T09:51:06Z","updated_at":"2016-09-07T09:51:06Z","html_url":"https://github.com/ef-ctx/tranor/pull/3#discussion_r77792295","pull_request_url":"https://api.github.com/repos/ef-ctx/tranor/pulls/3","_links":{"self":{"href":"https://api.github.com/repos/ef-ctx/tranor/pulls/comments/77792295"},"html":{"href":"https://github.com/ef-ctx/tranor/pull/3#discussion_r77792295"},"pull_request":{"href":"https://api.github.com/repos/ef-ctx/tranor/pulls/3"}}},"pull_request":{"url":"https://api.github.com/repos/ef-ctx/tranor/pulls/3","id":84025001,"html_url":"https://github.com/ef-ctx/tranor/pull/3","diff_url":"https://github.com/ef-ctx/tranor/pull/3.diff","patch_url":"https://github.com/ef-ctx/tranor/pull/3.patch","issue_url":"https://api.github.com/repos/ef-ctx/tranor/issues/3","number":3,"state":"open","locked":false,"title":"Implement project management commands","user":{"login":"fsouza","id":108725,"avatar_url":"https://avatars.githubusercontent.com/u/108725?v=3","gravatar_id":"","url":"https://api.github.com/users/fsouza","html_url":"https://github.com/fsouza","followers_url":"https://api.github.com/users/fsouza/followers","following_url":"https://api.github.com/users/fsouza/following{/other_user}","gists_url":"https://api.github.com/users/fsouza/gists{/gist_id}","starred_url":"https://api.github.com/users/fsouza/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fsouza/subscriptions","organizations_url":"https://api.github.com/users/fsouza/orgs","repos_url":"https://api.github.com/users/fsouza/repos","events_url":"https://api.github.com/users/fsouza/events{/privacy}","received_events_url":"https://api.github.com/users/fsouza/received_events","type":"User","site_admin":false},"body":"I'd recommend running tsuru locally with [tsuru-bootstrap](https://github.com/tsuru/tsuru-bootstrap) to review this locally.\r\n\r\nHere's a terminal session using the commands, to help reviewing:\r\n\r\n```\r\n% tsuru-admin pool-add -p dev/dev.example.com\r\nPool successfully registered.\r\n% tsuru-admin pool-add -p qa/qa.example.com\r\nPool successfully registered.\r\n% tsuru-admin pool-add -p stage/stage.example.com\r\nPool successfully registered.\r\n% tsuru-admin pool-add -p production/example.com\r\nPool successfully registered.\r\n% tranor target-set https://gist.githubusercontent.com/fsouza/ac50e24d18bd7c24588164481fa3686b/raw/482b60f8ecff0cf77bcc2db8903dff5492910447/\r\nTarget successfully defined!\r\n% tranor env-list\r\n+-------------+-------------------+\r\n| Environment | DNS Suffix        |\r\n+-------------+-------------------+\r\n| dev         | dev.example.com   |\r\n| qa          | qa.example.com    |\r\n| stage       | stage.example.com |\r\n| production  | example.com       |\r\n+-------------+-------------------+\r\n% tranor project-create --name myblog --platform python --team admin\r\nsuccessfully created the project \"myblog\"!\r\nGit repository: git@192.168.50.4.nip.io:myblog-dev.git\r\n% tranor project-create -n website -l static -t admin -e dev,production\r\nsuccessfully created the project \"website\"!\r\nGit repository: git@192.168.50.4.nip.io:website-dev.git\r\n% tranor project-list\r\n+---------+--------------+--------------------------+\r\n| Project | Environments | Address                  |\r\n+---------+--------------+--------------------------+\r\n| myblog  | dev          | myblog.dev.example.com   |\r\n|         | qa           | myblog.qa.example.com    |\r\n|         | stage        | myblog.stage.example.com |\r\n|         | production   | myblog.example.com       |\r\n+---------+--------------+--------------------------+\r\n| website | dev          | website.dev.example.com  |\r\n|         | production   | website.example.com      |\r\n+---------+--------------+--------------------------+\r\n# ... manually deploy the app website-dev\r\n% tranor project-info -n website\r\nProject name: website\r\n\r\n+-------------+-------------------------+---------+-------------------------------+\r\n| Environment | Address                 | Version | Deploy date                   |\r\n+-------------+-------------------------+---------+-------------------------------+\r\n| dev         | website.dev.example.com | v1      | Mon, 05 Sep 2016 16:36:19 UTC |\r\n| production  | website.example.com     |         |                               |\r\n+-------------+-------------------------+---------+-------------------------------+\r\n```","created_at":"2016-09-05T16:42:40Z","updated_at":"2016-09-07T09:51:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d02e56a8d95cc4637abb6bd258f47075ccc95897","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ef-ctx/tranor/pulls/3/commits","review_comments_url":"https://api.github.com/repos/ef-ctx/tranor/pulls/3/comments","review_comment_url":"https://api.github.com/repos/ef-ctx/tranor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ef-ctx/tranor/issues/3/comments","statuses_url":"https://api.github.com/repos/ef-ctx/tranor/statuses/c9c9e59b21db79a6d97a3ecc20d12532fd0b3d25","head":{"label":"ef-ctx:project-management","ref":"project-management","sha":"c9c9e59b21db79a6d97a3ecc20d12532fd0b3d25","user":{"login":"ef-ctx","id":5428519,"avatar_url":"https://avatars.githubusercontent.com/u/5428519?v=3","gravatar_id":"","url":"https://api.github.com/users/ef-ctx","html_url":"https://github.com/ef-ctx","followers_url":"https://api.github.com/users/ef-ctx/followers","following_url":"https://api.github.com/users/ef-ctx/following{/other_user}","gists_url":"https://api.github.com/users/ef-ctx/gists{/gist_id}","starred_url":"https://api.github.com/users/ef-ctx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ef-ctx/subscriptions","organizations_url":"https://api.github.com/users/ef-ctx/orgs","repos_url":"https://api.github.com/users/ef-ctx/repos","events_url":"https://api.github.com/users/ef-ctx/events{/privacy}","received_events_url":"https://api.github.com/users/ef-ctx/received_events","type":"Organization","site_admin":false},"repo":{"id":53431215,"name":"tranor","full_name":"ef-ctx/tranor","owner":{"login":"ef-ctx","id":5428519,"avatar_url":"https://avatars.githubusercontent.com/u/5428519?v=3","gravatar_id":"","url":"https://api.github.com/users/ef-ctx","html_url":"https://github.com/ef-ctx","followers_url":"https://api.github.com/users/ef-ctx/followers","following_url":"https://api.github.com/users/ef-ctx/following{/other_user}","gists_url":"https://api.github.com/users/ef-ctx/gists{/gist_id}","starred_url":"https://api.github.com/users/ef-ctx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ef-ctx/subscriptions","organizations_url":"https://api.github.com/users/ef-ctx/orgs","repos_url":"https://api.github.com/users/ef-ctx/repos","events_url":"https://api.github.com/users/ef-ctx/events{/privacy}","received_events_url":"https://api.github.com/users/ef-ctx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ef-ctx/tranor","description":"Tsuru plugin which adds the \"environment\" concept (eg. dev, QA, prod)  to Tsuru PaaS","fork":false,"url":"https://api.github.com/repos/ef-ctx/tranor","forks_url":"https://api.github.com/repos/ef-ctx/tranor/forks","keys_url":"https://api.github.com/repos/ef-ctx/tranor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ef-ctx/tranor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ef-ctx/tranor/teams","hooks_url":"https://api.github.com/repos/ef-ctx/tranor/hooks","issue_events_url":"https://api.github.com/repos/ef-ctx/tranor/issues/events{/number}","events_url":"https://api.github.com/repos/ef-ctx/tranor/events","assignees_url":"https://api.github.com/repos/ef-ctx/tranor/assignees{/user}","branches_url":"https://api.github.com/repos/ef-ctx/tranor/branches{/branch}","tags_url":"https://api.github.com/repos/ef-ctx/tranor/tags","blobs_url":"https://api.github.com/repos/ef-ctx/tranor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ef-ctx/tranor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ef-ctx/tranor/git/refs{/sha}","trees_url":"https://api.github.com/repos/ef-ctx/tranor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ef-ctx/tranor/statuses/{sha}","languages_url":"https://api.github.com/repos/ef-ctx/tranor/languages","stargazers_url":"https://api.github.com/repos/ef-ctx/tranor/stargazers","contributors_url":"https://api.github.com/repos/ef-ctx/tranor/contributors","subscribers_url":"https://api.github.com/repos/ef-ctx/tranor/subscribers","subscription_url":"https://api.github.com/repos/ef-ctx/tranor/subscription","commits_url":"https://api.github.com/repos/ef-ctx/tranor/commits{/sha}","git_commits_url":"https://api.github.com/repos/ef-ctx/tranor/git/commits{/sha}","comments_url":"https://api.github.com/repos/ef-ctx/tranor/comments{/number}","issue_comment_url":"https://api.github.com/repos/ef-ctx/tranor/issues/comments{/number}","contents_url":"https://api.github.com/repos/ef-ctx/tranor/contents/{+path}","compare_url":"https://api.github.com/repos/ef-ctx/tranor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ef-ctx/tranor/merges","archive_url":"https://api.github.com/repos/ef-ctx/tranor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ef-ctx/tranor/downloads","issues_url":"https://api.github.com/repos/ef-ctx/tranor/issues{/number}","pulls_url":"https://api.github.com/repos/ef-ctx/tranor/pulls{/number}","milestones_url":"https://api.github.com/repos/ef-ctx/tranor/milestones{/number}","notifications_url":"https://api.github.com/repos/ef-ctx/tranor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ef-ctx/tranor/labels{/name}","releases_url":"https://api.github.com/repos/ef-ctx/tranor/releases{/id}","deployments_url":"https://api.github.com/repos/ef-ctx/tranor/deployments","created_at":"2016-03-08T17:22:25Z","updated_at":"2016-06-28T10:34:52Z","pushed_at":"2016-09-07T01:41:41Z","git_url":"git://github.com/ef-ctx/tranor.git","ssh_url":"git@github.com:ef-ctx/tranor.git","clone_url":"https://github.com/ef-ctx/tranor.git","svn_url":"https://github.com/ef-ctx/tranor","homepage":null,"size":910,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"base":{"label":"ef-ctx:master","ref":"master","sha":"95cc32a8adef49f0c1faace1f308cc618774b2f8","user":{"login":"ef-ctx","id":5428519,"avatar_url":"https://avatars.githubusercontent.com/u/5428519?v=3","gravatar_id":"","url":"https://api.github.com/users/ef-ctx","html_url":"https://github.com/ef-ctx","followers_url":"https://api.github.com/users/ef-ctx/followers","following_url":"https://api.github.com/users/ef-ctx/following{/other_user}","gists_url":"https://api.github.com/users/ef-ctx/gists{/gist_id}","starred_url":"https://api.github.com/users/ef-ctx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ef-ctx/subscriptions","organizations_url":"https://api.github.com/users/ef-ctx/orgs","repos_url":"https://api.github.com/users/ef-ctx/repos","events_url":"https://api.github.com/users/ef-ctx/events{/privacy}","received_events_url":"https://api.github.com/users/ef-ctx/received_events","type":"Organization","site_admin":false},"repo":{"id":53431215,"name":"tranor","full_name":"ef-ctx/tranor","owner":{"login":"ef-ctx","id":5428519,"avatar_url":"https://avatars.githubusercontent.com/u/5428519?v=3","gravatar_id":"","url":"https://api.github.com/users/ef-ctx","html_url":"https://github.com/ef-ctx","followers_url":"https://api.github.com/users/ef-ctx/followers","following_url":"https://api.github.com/users/ef-ctx/following{/other_user}","gists_url":"https://api.github.com/users/ef-ctx/gists{/gist_id}","starred_url":"https://api.github.com/users/ef-ctx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ef-ctx/subscriptions","organizations_url":"https://api.github.com/users/ef-ctx/orgs","repos_url":"https://api.github.com/users/ef-ctx/repos","events_url":"https://api.github.com/users/ef-ctx/events{/privacy}","received_events_url":"https://api.github.com/users/ef-ctx/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ef-ctx/tranor","description":"Tsuru plugin which adds the \"environment\" concept (eg. dev, QA, prod)  to Tsuru PaaS","fork":false,"url":"https://api.github.com/repos/ef-ctx/tranor","forks_url":"https://api.github.com/repos/ef-ctx/tranor/forks","keys_url":"https://api.github.com/repos/ef-ctx/tranor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ef-ctx/tranor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ef-ctx/tranor/teams","hooks_url":"https://api.github.com/repos/ef-ctx/tranor/hooks","issue_events_url":"https://api.github.com/repos/ef-ctx/tranor/issues/events{/number}","events_url":"https://api.github.com/repos/ef-ctx/tranor/events","assignees_url":"https://api.github.com/repos/ef-ctx/tranor/assignees{/user}","branches_url":"https://api.github.com/repos/ef-ctx/tranor/branches{/branch}","tags_url":"https://api.github.com/repos/ef-ctx/tranor/tags","blobs_url":"https://api.github.com/repos/ef-ctx/tranor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ef-ctx/tranor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ef-ctx/tranor/git/refs{/sha}","trees_url":"https://api.github.com/repos/ef-ctx/tranor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ef-ctx/tranor/statuses/{sha}","languages_url":"https://api.github.com/repos/ef-ctx/tranor/languages","stargazers_url":"https://api.github.com/repos/ef-ctx/tranor/stargazers","contributors_url":"https://api.github.com/repos/ef-ctx/tranor/contributors","subscribers_url":"https://api.github.com/repos/ef-ctx/tranor/subscribers","subscription_url":"https://api.github.com/repos/ef-ctx/tranor/subscription","commits_url":"https://api.github.com/repos/ef-ctx/tranor/commits{/sha}","git_commits_url":"https://api.github.com/repos/ef-ctx/tranor/git/commits{/sha}","comments_url":"https://api.github.com/repos/ef-ctx/tranor/comments{/number}","issue_comment_url":"https://api.github.com/repos/ef-ctx/tranor/issues/comments{/number}","contents_url":"https://api.github.com/repos/ef-ctx/tranor/contents/{+path}","compare_url":"https://api.github.com/repos/ef-ctx/tranor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ef-ctx/tranor/merges","archive_url":"https://api.github.com/repos/ef-ctx/tranor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ef-ctx/tranor/downloads","issues_url":"https://api.github.com/repos/ef-ctx/tranor/issues{/number}","pulls_url":"https://api.github.com/repos/ef-ctx/tranor/pulls{/number}","milestones_url":"https://api.github.com/repos/ef-ctx/tranor/milestones{/number}","notifications_url":"https://api.github.com/repos/ef-ctx/tranor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ef-ctx/tranor/labels{/name}","releases_url":"https://api.github.com/repos/ef-ctx/tranor/releases{/id}","deployments_url":"https://api.github.com/repos/ef-ctx/tranor/deployments","created_at":"2016-03-08T17:22:25Z","updated_at":"2016-06-28T10:34:52Z","pushed_at":"2016-09-07T01:41:41Z","git_url":"git://github.com/ef-ctx/tranor.git","ssh_url":"git@github.com:ef-ctx/tranor.git","clone_url":"https://github.com/ef-ctx/tranor.git","svn_url":"https://github.com/ef-ctx/tranor","homepage":null,"size":910,"stargazers_count":2,"watchers_count":2,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":2,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ef-ctx/tranor/pulls/3"},"html":{"href":"https://github.com/ef-ctx/tranor/pull/3"},"issue":{"href":"https://api.github.com/repos/ef-ctx/tranor/issues/3"},"comments":{"href":"https://api.github.com/repos/ef-ctx/tranor/issues/3/comments"},"review_comments":{"href":"https://api.github.com/repos/ef-ctx/tranor/pulls/3/comments"},"review_comment":{"href":"https://api.github.com/repos/ef-ctx/tranor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ef-ctx/tranor/pulls/3/commits"},"statuses":{"href":"https://api.github.com/repos/ef-ctx/tranor/statuses/c9c9e59b21db79a6d97a3ecc20d12532fd0b3d25"}}}}
{"actor":{"display_login":"tatiana"}}