{"action":"created","comment":{"url":"https://api.github.com/repos/juju/juju/pulls/comments/180349409","pull_request_review_id":110602391,"id":180349409,"diff_hunk":"@@ -0,0 +1,336 @@\n+// Copyright 2018 Canonical Ltd.\n+// Licensed under the AGPLv3, see LICENCE file for details.\n+\n+package oci\n+\n+import (\n+\t\"crypto/x509\"\n+\t\"encoding/pem\"\n+\t\"fmt\"\n+\t\"io/ioutil\"\n+\n+\t\"github.com/juju/errors\"\n+\t\"github.com/juju/jsonschema\"\n+\t\"github.com/juju/loggo\"\n+\t\"github.com/juju/schema\"\n+\t\"github.com/juju/utils/clock\"\n+\t\"gopkg.in/juju/environschema.v1\"\n+\n+\t\"github.com/juju/juju/cloud\"\n+\t\"github.com/juju/juju/environs\"\n+\t\"github.com/juju/juju/environs/config\"\n+\t\"github.com/juju/juju/instance\"\n+\tproviderCommon \"github.com/juju/juju/provider/oci/common\"\n+\n+\t\"gopkg.in/ini.v1\"\n+)\n+\n+var logger = loggo.GetLogger(\"juju.provider.oracle\")\n+\n+// EnvironProvider type implements environs.EnvironProvider interface\n+type EnvironProvider struct{}\n+\n+type environConfig struct {\n+\t*config.Config\n+\tattrs map[string]interface{}\n+}\n+\n+var _ config.ConfigSchemaSource = (*EnvironProvider)(nil)\n+var _ environs.ProviderSchema = (*EnvironProvider)(nil)\n+\n+var cloudSchema = &jsonschema.Schema{\n+\tType:     []jsonschema.Type{jsonschema.ObjectType},\n+\tRequired: []string{cloud.RegionsKey, cloud.AuthTypesKey},\n+\tOrder:    []string{cloud.RegionsKey, cloud.AuthTypesKey},\n+\tProperties: map[string]*jsonschema.Schema{\n+\t\tcloud.RegionsKey: {\n+\t\t\tType:     []jsonschema.Type{jsonschema.ObjectType},\n+\t\t\tSingular: \"region\",\n+\t\t\tPlural:   \"regions\",\n+\t\t\tAdditionalProperties: &jsonschema.Schema{\n+\t\t\t\tType: []jsonschema.Type{jsonschema.ObjectType},\n+\t\t\t},\n+\t\t},\n+\t\tcloud.AuthTypesKey: {\n+\t\t\t// don't need a prompt, since there's only one choice.\n+\t\t\tType: []jsonschema.Type{jsonschema.ArrayType},\n+\t\t\tEnum: []interface{}{[]string{string(cloud.HTTPSigAuthType)}},\n+\t\t},\n+\t},\n+}\n+\n+var configSchema = environschema.Fields{\n+\t\"compartment-id\": {\n+\t\tDescription: \"The OCID of the compartment in which juju has access to create resources.\",\n+\t\tType:        environschema.Tstring,\n+\t},\n+}\n+\n+var configDefaults = schema.Defaults{\n+\t\"compartment-id\": \"\",\n+}\n+\n+var configFields = func() schema.Fields {\n+\tfs, _, err := configSchema.ValidationSchema()\n+\tif err != nil {\n+\t\tpanic(err)\n+\t}\n+\treturn fs\n+}()\n+\n+// credentialSection holds the keys present in one section of the OCI\n+// config file, as created by the OCI command line. This is only used\n+// during credential detection\n+type credentialSection struct {\n+\tUser        string\n+\tTenancy     string\n+\tKeyFile     string\n+\tPassPhrase  string\n+\tFingerprint string\n+\tRegion      string\n+}\n+\n+var credentialSchema = map[cloud.AuthType]cloud.CredentialSchema{\n+\tcloud.HTTPSigAuthType: {\n+\t\t{\n+\t\t\t\"user\", cloud.CredentialAttr{\n+\t\t\t\tDescription: \"Username OCID\",\n+\t\t\t},\n+\t\t},\n+\t\t{\n+\t\t\t\"tenancy\", cloud.CredentialAttr{\n+\t\t\t\tDescription: \"Tenancy OCID\",\n+\t\t\t},\n+\t\t},\n+\t\t{\n+\t\t\t\"key\", cloud.CredentialAttr{\n+\t\t\t\tDescription: \"PEM encoded private key\",\n+\t\t\t},\n+\t\t},\n+\t\t{\n+\t\t\t\"pass-phrase\", cloud.CredentialAttr{\n+\t\t\t\tDescription: \"Passphrase used to unlock the key\",\n+\t\t\t\tHidden:      true,\n+\t\t\t},\n+\t\t},\n+\t\t{\n+\t\t\t\"fingerprint\", cloud.CredentialAttr{\n+\t\t\t\tDescription: \"Private key fingerprint\",\n+\t\t\t},\n+\t\t},\n+\t\t{\n+\t\t\t\"region\", cloud.CredentialAttr{\n+\t\t\t\tDescription: \"Region to log into\",\n+\t\t\t},\n+\t\t},\n+\t},\n+}\n+\n+func (p EnvironProvider) newConfig(cfg *config.Config) (*environConfig, error) {\n+\tvalid, err := p.Validate(cfg, nil)\n+\tif err != nil {\n+\t\treturn nil, err\n+\t}\n+\treturn &environConfig{valid, valid.UnknownAttrs()}, nil\n+}\n+\n+func (c *environConfig) compartmentID() *string {\n+\tcompartmentID := c.attrs[\"compartment-id\"].(string)\n+\treturn &compartmentID\n+}\n+\n+// Schema implements environs.ProviderSchema\n+func (o *EnvironProvider) Schema() environschema.Fields {\n+\tfields, err := config.Schema(configSchema)\n+\tif err != nil {\n+\t\tpanic(err)\n+\t}\n+\treturn fields\n+}\n+\n+// ConfigSchema implements config.ConfigSchemaSource\n+func (o *EnvironProvider) ConfigSchema() schema.Fields {\n+\treturn configFields\n+}\n+\n+// ConfigDefaults implements config.ConfigSchemaSource\n+func (o *EnvironProvider) ConfigDefaults() schema.Defaults {\n+\treturn configDefaults\n+}\n+\n+// Version implements environs.EnvironProvider.\n+func (e EnvironProvider) Version() int {\n+\treturn 0\n+}\n+\n+// CloudSchema implements environs.EnvironProvider.\n+func (e EnvironProvider) CloudSchema() *jsonschema.Schema {\n+\treturn cloudSchema\n+}\n+\n+// Ping implements environs.EnvironProvider.\n+func (e *EnvironProvider) Ping(endpoint string) error {\n+\treturn errors.NotImplementedf(\"Ping\")\n+}\n+\n+func validateCloudSpec(c environs.CloudSpec) error {\n+\tif err := c.Validate(); err != nil {\n+\t\treturn errors.Trace(err)\n+\t}\n+\tif c.Credential == nil {\n+\t\treturn errors.NotValidf(\"missing credential\")\n+\t}\n+\tif authType := c.Credential.AuthType(); authType != cloud.HTTPSigAuthType {\n+\t\treturn errors.NotSupportedf(\"%q auth-type\", authType)\n+\t}\n+\treturn nil\n+}\n+\n+// PrepareConfig implements environs.EnvironProvider.\n+func (e EnvironProvider) PrepareConfig(args environs.PrepareConfigParams) (*config.Config, error) {\n+\tif err := validateCloudSpec(args.Cloud); err != nil {\n+\t\treturn nil, errors.Annotate(err, \"validating cloud spec\")\n+\t}\n+\t// TODO(gsamfira): Set default block storage backend\n+\treturn args.Config, nil\n+}\n+\n+// Open implements environs.EnvironProvider.\n+func (e *EnvironProvider) Open(params environs.OpenParams) (environs.Environ, error) {\n+\tlogger.Infof(\"opening model %q\", params.Config.Name())\n+\n+\tif err := validateCloudSpec(params.Cloud); err != nil {\n+\t\treturn nil, errors.Trace(err)\n+\t}\n+\n+\tcreds := params.Cloud.Credential.Attributes()\n+\tprovider := providerCommon.NewJujuConfigProvider(\n+\t\tcreds[\"user\"], creds[\"tenancy\"],\n+\t\t[]byte(creds[\"key\"]), creds[\"fingerprint\"],\n+\t\tcreds[\"pass-phrase\"], creds[\"region\"])\n+\n+\tclient, err := providerCommon.NewOciClient(provider)\n+\tif err != nil {\n+\t\treturn nil, errors.Trace(err)\n+\t}\n+\n+\tenv := &Environ{\n+\t\tcli:   client,\n+\t\tp:     e,\n+\t\tclock: clock.WallClock,\n+\t}\n+\n+\tif err := env.SetConfig(params.Config); err != nil {\n+\t\treturn nil, err\n+\t}\n+\n+\tenv.namespace, err = instance.NewNamespace(env.Config().UUID())\n+\n+\tcfg := env.ecfg()\n+\tif cfg.compartmentID() == nil {\n+\t\treturn nil, errors.New(\"compartment-id may not be empty\")\n+\t}\n+\n+\treturn env, nil\n+}\n+\n+// CredentialSchemas implements environs.ProviderCredentials.\n+func (e EnvironProvider) CredentialSchemas() map[cloud.AuthType]cloud.CredentialSchema {\n+\treturn credentialSchema\n+}\n+\n+func validateKey(key []byte, passphrase string) error {\n+\tkeyBlock, _ := pem.Decode(key)\n+\tif keyBlock == nil {\n+\t\treturn errors.Errorf(\"invalid private key\")\n+\t}\n+\n+\tif x509.IsEncryptedPEMBlock(keyBlock) {\n+\t\tif _, err := x509.DecryptPEMBlock(keyBlock, []byte(passphrase)); err != nil {\n+\t\t\treturn errors.Annotatef(err, \"decrypting private key\")\n+\t\t}\n+\t}\n+\n+\treturn nil\n+}\n+\n+// DetectCredentials implements environs.ProviderCredentials.\n+func (e EnvironProvider) DetectCredentials() (*cloud.CloudCredential, error) {","path":"provider/oci/provider.go","position":258,"original_position":258,"commit_id":"f4ae4a488594d141119277d8107313c9c5926d0f","original_commit_id":"f4b180364066bcdf735a78418ae5327a48fd5cfa","user":{"login":"gabriel-samfira","id":903160,"avatar_url":"https://avatars3.githubusercontent.com/u/903160?v=4","gravatar_id":"","url":"https://api.github.com/users/gabriel-samfira","html_url":"https://github.com/gabriel-samfira","followers_url":"https://api.github.com/users/gabriel-samfira/followers","following_url":"https://api.github.com/users/gabriel-samfira/following{/other_user}","gists_url":"https://api.github.com/users/gabriel-samfira/gists{/gist_id}","starred_url":"https://api.github.com/users/gabriel-samfira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabriel-samfira/subscriptions","organizations_url":"https://api.github.com/users/gabriel-samfira/orgs","repos_url":"https://api.github.com/users/gabriel-samfira/repos","events_url":"https://api.github.com/users/gabriel-samfira/events{/privacy}","received_events_url":"https://api.github.com/users/gabriel-samfira/received_events","type":"User","site_admin":false},"body":"yes. Adding link to documentation.","created_at":"2018-04-10T09:18:20Z","updated_at":"2018-04-10T09:34:41Z","html_url":"https://github.com/juju/juju/pull/8535#discussion_r180349409","pull_request_url":"https://api.github.com/repos/juju/juju/pulls/8535","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/comments/180349409"},"html":{"href":"https://github.com/juju/juju/pull/8535#discussion_r180349409"},"pull_request":{"href":"https://api.github.com/repos/juju/juju/pulls/8535"}},"in_reply_to_id":179392521},"pull_request":{"url":"https://api.github.com/repos/juju/juju/pulls/8535","id":177701110,"html_url":"https://github.com/juju/juju/pull/8535","diff_url":"https://github.com/juju/juju/pull/8535.diff","patch_url":"https://github.com/juju/juju/pull/8535.patch","issue_url":"https://api.github.com/repos/juju/juju/issues/8535","number":8535,"state":"open","locked":false,"title":"Add OCI provider [2/7]","user":{"login":"gabriel-samfira","id":903160,"avatar_url":"https://avatars3.githubusercontent.com/u/903160?v=4","gravatar_id":"","url":"https://api.github.com/users/gabriel-samfira","html_url":"https://github.com/gabriel-samfira","followers_url":"https://api.github.com/users/gabriel-samfira/followers","following_url":"https://api.github.com/users/gabriel-samfira/following{/other_user}","gists_url":"https://api.github.com/users/gabriel-samfira/gists{/gist_id}","starred_url":"https://api.github.com/users/gabriel-samfira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabriel-samfira/subscriptions","organizations_url":"https://api.github.com/users/gabriel-samfira/orgs","repos_url":"https://api.github.com/users/gabriel-samfira/repos","events_url":"https://api.github.com/users/gabriel-samfira/events{/privacy}","received_events_url":"https://api.github.com/users/gabriel-samfira/received_events","type":"User","site_admin":false},"body":"Adds functionality that deals with configuring the provider, auto-loading credentials, and an interface that describes the provider API that will be used.\r\n\r\nDepends on: https://github.com/juju/juju/pull/8534","created_at":"2018-03-27T10:49:28Z","updated_at":"2018-04-10T09:34:41Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9af0b01e0ddd26d6e4c9093bb3b7af7fb3b7d426","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/juju/juju/pulls/8535/commits","review_comments_url":"https://api.github.com/repos/juju/juju/pulls/8535/comments","review_comment_url":"https://api.github.com/repos/juju/juju/pulls/comments{/number}","comments_url":"https://api.github.com/repos/juju/juju/issues/8535/comments","statuses_url":"https://api.github.com/repos/juju/juju/statuses/f4ae4a488594d141119277d8107313c9c5926d0f","head":{"label":"gabriel-samfira:oci-provider-add-config","ref":"oci-provider-add-config","sha":"f4ae4a488594d141119277d8107313c9c5926d0f","user":{"login":"gabriel-samfira","id":903160,"avatar_url":"https://avatars3.githubusercontent.com/u/903160?v=4","gravatar_id":"","url":"https://api.github.com/users/gabriel-samfira","html_url":"https://github.com/gabriel-samfira","followers_url":"https://api.github.com/users/gabriel-samfira/followers","following_url":"https://api.github.com/users/gabriel-samfira/following{/other_user}","gists_url":"https://api.github.com/users/gabriel-samfira/gists{/gist_id}","starred_url":"https://api.github.com/users/gabriel-samfira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabriel-samfira/subscriptions","organizations_url":"https://api.github.com/users/gabriel-samfira/orgs","repos_url":"https://api.github.com/users/gabriel-samfira/repos","events_url":"https://api.github.com/users/gabriel-samfira/events{/privacy}","received_events_url":"https://api.github.com/users/gabriel-samfira/received_events","type":"User","site_admin":false},"repo":{"id":20686648,"name":"juju","full_name":"gabriel-samfira/juju","owner":{"login":"gabriel-samfira","id":903160,"avatar_url":"https://avatars3.githubusercontent.com/u/903160?v=4","gravatar_id":"","url":"https://api.github.com/users/gabriel-samfira","html_url":"https://github.com/gabriel-samfira","followers_url":"https://api.github.com/users/gabriel-samfira/followers","following_url":"https://api.github.com/users/gabriel-samfira/following{/other_user}","gists_url":"https://api.github.com/users/gabriel-samfira/gists{/gist_id}","starred_url":"https://api.github.com/users/gabriel-samfira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabriel-samfira/subscriptions","organizations_url":"https://api.github.com/users/gabriel-samfira/orgs","repos_url":"https://api.github.com/users/gabriel-samfira/repos","events_url":"https://api.github.com/users/gabriel-samfira/events{/privacy}","received_events_url":"https://api.github.com/users/gabriel-samfira/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gabriel-samfira/juju","description":"juju is devops distilled","fork":true,"url":"https://api.github.com/repos/gabriel-samfira/juju","forks_url":"https://api.github.com/repos/gabriel-samfira/juju/forks","keys_url":"https://api.github.com/repos/gabriel-samfira/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gabriel-samfira/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gabriel-samfira/juju/teams","hooks_url":"https://api.github.com/repos/gabriel-samfira/juju/hooks","issue_events_url":"https://api.github.com/repos/gabriel-samfira/juju/issues/events{/number}","events_url":"https://api.github.com/repos/gabriel-samfira/juju/events","assignees_url":"https://api.github.com/repos/gabriel-samfira/juju/assignees{/user}","branches_url":"https://api.github.com/repos/gabriel-samfira/juju/branches{/branch}","tags_url":"https://api.github.com/repos/gabriel-samfira/juju/tags","blobs_url":"https://api.github.com/repos/gabriel-samfira/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gabriel-samfira/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gabriel-samfira/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/gabriel-samfira/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gabriel-samfira/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/gabriel-samfira/juju/languages","stargazers_url":"https://api.github.com/repos/gabriel-samfira/juju/stargazers","contributors_url":"https://api.github.com/repos/gabriel-samfira/juju/contributors","subscribers_url":"https://api.github.com/repos/gabriel-samfira/juju/subscribers","subscription_url":"https://api.github.com/repos/gabriel-samfira/juju/subscription","commits_url":"https://api.github.com/repos/gabriel-samfira/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/gabriel-samfira/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/gabriel-samfira/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/gabriel-samfira/juju/issues/comments{/number}","contents_url":"https://api.github.com/repos/gabriel-samfira/juju/contents/{+path}","compare_url":"https://api.github.com/repos/gabriel-samfira/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gabriel-samfira/juju/merges","archive_url":"https://api.github.com/repos/gabriel-samfira/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gabriel-samfira/juju/downloads","issues_url":"https://api.github.com/repos/gabriel-samfira/juju/issues{/number}","pulls_url":"https://api.github.com/repos/gabriel-samfira/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/gabriel-samfira/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/gabriel-samfira/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gabriel-samfira/juju/labels{/name}","releases_url":"https://api.github.com/repos/gabriel-samfira/juju/releases{/id}","deployments_url":"https://api.github.com/repos/gabriel-samfira/juju/deployments","created_at":"2014-06-10T13:41:36Z","updated_at":"2016-11-15T16:15:59Z","pushed_at":"2018-04-09T17:31:42Z","git_url":"git://github.com/gabriel-samfira/juju.git","ssh_url":"git@github.com:gabriel-samfira/juju.git","clone_url":"https://github.com/gabriel-samfira/juju.git","svn_url":"https://github.com/gabriel-samfira/juju","homepage":"juju.ubuntu.com","size":203372,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":2,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"juju:develop","ref":"develop","sha":"8f5bab7eb7b300162cc47c9c5c5940e7cc24eed0","user":{"login":"juju","id":4604548,"avatar_url":"https://avatars0.githubusercontent.com/u/4604548?v=4","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"repo":{"id":20445947,"name":"juju","full_name":"juju/juju","owner":{"login":"juju","id":4604548,"avatar_url":"https://avatars0.githubusercontent.com/u/4604548?v=4","gravatar_id":"","url":"https://api.github.com/users/juju","html_url":"https://github.com/juju","followers_url":"https://api.github.com/users/juju/followers","following_url":"https://api.github.com/users/juju/following{/other_user}","gists_url":"https://api.github.com/users/juju/gists{/gist_id}","starred_url":"https://api.github.com/users/juju/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/juju/subscriptions","organizations_url":"https://api.github.com/users/juju/orgs","repos_url":"https://api.github.com/users/juju/repos","events_url":"https://api.github.com/users/juju/events{/privacy}","received_events_url":"https://api.github.com/users/juju/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/juju/juju","description":"juju is devops distilled","fork":false,"url":"https://api.github.com/repos/juju/juju","forks_url":"https://api.github.com/repos/juju/juju/forks","keys_url":"https://api.github.com/repos/juju/juju/keys{/key_id}","collaborators_url":"https://api.github.com/repos/juju/juju/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/juju/juju/teams","hooks_url":"https://api.github.com/repos/juju/juju/hooks","issue_events_url":"https://api.github.com/repos/juju/juju/issues/events{/number}","events_url":"https://api.github.com/repos/juju/juju/events","assignees_url":"https://api.github.com/repos/juju/juju/assignees{/user}","branches_url":"https://api.github.com/repos/juju/juju/branches{/branch}","tags_url":"https://api.github.com/repos/juju/juju/tags","blobs_url":"https://api.github.com/repos/juju/juju/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/juju/juju/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/juju/juju/git/refs{/sha}","trees_url":"https://api.github.com/repos/juju/juju/git/trees{/sha}","statuses_url":"https://api.github.com/repos/juju/juju/statuses/{sha}","languages_url":"https://api.github.com/repos/juju/juju/languages","stargazers_url":"https://api.github.com/repos/juju/juju/stargazers","contributors_url":"https://api.github.com/repos/juju/juju/contributors","subscribers_url":"https://api.github.com/repos/juju/juju/subscribers","subscription_url":"https://api.github.com/repos/juju/juju/subscription","commits_url":"https://api.github.com/repos/juju/juju/commits{/sha}","git_commits_url":"https://api.github.com/repos/juju/juju/git/commits{/sha}","comments_url":"https://api.github.com/repos/juju/juju/comments{/number}","issue_comment_url":"https://api.github.com/repos/juju/juju/issues/comments{/number}","contents_url":"https://api.github.com/repos/juju/juju/contents/{+path}","compare_url":"https://api.github.com/repos/juju/juju/compare/{base}...{head}","merges_url":"https://api.github.com/repos/juju/juju/merges","archive_url":"https://api.github.com/repos/juju/juju/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/juju/juju/downloads","issues_url":"https://api.github.com/repos/juju/juju/issues{/number}","pulls_url":"https://api.github.com/repos/juju/juju/pulls{/number}","milestones_url":"https://api.github.com/repos/juju/juju/milestones{/number}","notifications_url":"https://api.github.com/repos/juju/juju/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/juju/juju/labels{/name}","releases_url":"https://api.github.com/repos/juju/juju/releases{/id}","deployments_url":"https://api.github.com/repos/juju/juju/deployments","created_at":"2014-06-03T14:28:10Z","updated_at":"2018-04-10T09:17:42Z","pushed_at":"2018-04-10T08:36:50Z","git_url":"git://github.com/juju/juju.git","ssh_url":"git@github.com:juju/juju.git","clone_url":"https://github.com/juju/juju.git","svn_url":"https://github.com/juju/juju","homepage":"juju.ubuntu.com","size":207879,"stargazers_count":1136,"watchers_count":1136,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":263,"mirror_url":null,"archived":false,"open_issues_count":18,"license":{"key":"agpl-3.0","name":"GNU Affero General Public License v3.0","spdx_id":"AGPL-3.0","url":"https://api.github.com/licenses/agpl-3.0"},"forks":263,"open_issues":18,"watchers":1136,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/juju/juju/pulls/8535"},"html":{"href":"https://github.com/juju/juju/pull/8535"},"issue":{"href":"https://api.github.com/repos/juju/juju/issues/8535"},"comments":{"href":"https://api.github.com/repos/juju/juju/issues/8535/comments"},"review_comments":{"href":"https://api.github.com/repos/juju/juju/pulls/8535/comments"},"review_comment":{"href":"https://api.github.com/repos/juju/juju/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/juju/juju/pulls/8535/commits"},"statuses":{"href":"https://api.github.com/repos/juju/juju/statuses/f4ae4a488594d141119277d8107313c9c5926d0f"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"gabriel-samfira"}}