{"action":"created","comment":{"url":"https://api.github.com/repos/drone/drone-go/pulls/comments/51490619","id":51490619,"diff_hunk":"@@ -20,6 +23,24 @@ func init() {\n // Render parses and executes a template, returning the results\n // in string format.\n func Render(template string, playload *drone.Payload) (string, error) {\n+\tif strings.HasPrefix(template, \"http\") {\n+\t\tresp, err := http.Get(template)\n+\n+\t\tif err != nil {\n+\t\t\treturn \"\", errors.New(fmt.Sprintln(\"Failed to fetch remote template: \", err))","path":"template/template.go","position":20,"original_position":20,"commit_id":"33745ad06dbf9fdd6fad5bcef73e8ea79dae5b58","original_commit_id":"33745ad06dbf9fdd6fad5bcef73e8ea79dae5b58","user":{"login":"bradrydzewski","id":817538,"avatar_url":"https://avatars.githubusercontent.com/u/817538?v=3","gravatar_id":"","url":"https://api.github.com/users/bradrydzewski","html_url":"https://github.com/bradrydzewski","followers_url":"https://api.github.com/users/bradrydzewski/followers","following_url":"https://api.github.com/users/bradrydzewski/following{/other_user}","gists_url":"https://api.github.com/users/bradrydzewski/gists{/gist_id}","starred_url":"https://api.github.com/users/bradrydzewski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bradrydzewski/subscriptions","organizations_url":"https://api.github.com/users/bradrydzewski/orgs","repos_url":"https://api.github.com/users/bradrydzewski/repos","events_url":"https://api.github.com/users/bradrydzewski/events{/privacy}","received_events_url":"https://api.github.com/users/bradrydzewski/received_events","type":"User","site_admin":false},"body":"pro-tip ... you can use `fmt.Errorf` here :)","created_at":"2016-02-01T22:18:18Z","updated_at":"2016-02-01T22:18:18Z","html_url":"https://github.com/drone/drone-go/pull/18#discussion_r51490619","pull_request_url":"https://api.github.com/repos/drone/drone-go/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/drone/drone-go/pulls/comments/51490619"},"html":{"href":"https://github.com/drone/drone-go/pull/18#discussion_r51490619"},"pull_request":{"href":"https://api.github.com/repos/drone/drone-go/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/drone/drone-go/pulls/18","id":57828656,"html_url":"https://github.com/drone/drone-go/pull/18","diff_url":"https://github.com/drone/drone-go/pull/18.diff","patch_url":"https://github.com/drone/drone-go/pull/18.patch","issue_url":"https://api.github.com/repos/drone/drone-go/issues/18","number":18,"state":"open","locked":false,"title":"Integrated optional remote templates","user":{"login":"tboerger","id":156964,"avatar_url":"https://avatars.githubusercontent.com/u/156964?v=3","gravatar_id":"","url":"https://api.github.com/users/tboerger","html_url":"https://github.com/tboerger","followers_url":"https://api.github.com/users/tboerger/followers","following_url":"https://api.github.com/users/tboerger/following{/other_user}","gists_url":"https://api.github.com/users/tboerger/gists{/gist_id}","starred_url":"https://api.github.com/users/tboerger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tboerger/subscriptions","organizations_url":"https://api.github.com/users/tboerger/orgs","repos_url":"https://api.github.com/users/tboerger/repos","events_url":"https://api.github.com/users/tboerger/events{/privacy}","received_events_url":"https://api.github.com/users/tboerger/received_events","type":"User","site_admin":false},"body":null,"created_at":"2016-02-01T11:43:40Z","updated_at":"2016-02-01T22:18:18Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5143e6bc618630baba76133c6955feb7b8255b34","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/drone/drone-go/pulls/18/commits","review_comments_url":"https://api.github.com/repos/drone/drone-go/pulls/18/comments","review_comment_url":"https://api.github.com/repos/drone/drone-go/pulls/comments{/number}","comments_url":"https://api.github.com/repos/drone/drone-go/issues/18/comments","statuses_url":"https://api.github.com/repos/drone/drone-go/statuses/33745ad06dbf9fdd6fad5bcef73e8ea79dae5b58","head":{"label":"tboerger:feature/remote-template","ref":"feature/remote-template","sha":"33745ad06dbf9fdd6fad5bcef73e8ea79dae5b58","user":{"login":"tboerger","id":156964,"avatar_url":"https://avatars.githubusercontent.com/u/156964?v=3","gravatar_id":"","url":"https://api.github.com/users/tboerger","html_url":"https://github.com/tboerger","followers_url":"https://api.github.com/users/tboerger/followers","following_url":"https://api.github.com/users/tboerger/following{/other_user}","gists_url":"https://api.github.com/users/tboerger/gists{/gist_id}","starred_url":"https://api.github.com/users/tboerger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tboerger/subscriptions","organizations_url":"https://api.github.com/users/tboerger/orgs","repos_url":"https://api.github.com/users/tboerger/repos","events_url":"https://api.github.com/users/tboerger/events{/privacy}","received_events_url":"https://api.github.com/users/tboerger/received_events","type":"User","site_admin":false},"repo":{"id":48878527,"name":"drone-go","full_name":"tboerger/drone-go","owner":{"login":"tboerger","id":156964,"avatar_url":"https://avatars.githubusercontent.com/u/156964?v=3","gravatar_id":"","url":"https://api.github.com/users/tboerger","html_url":"https://github.com/tboerger","followers_url":"https://api.github.com/users/tboerger/followers","following_url":"https://api.github.com/users/tboerger/following{/other_user}","gists_url":"https://api.github.com/users/tboerger/gists{/gist_id}","starred_url":"https://api.github.com/users/tboerger/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tboerger/subscriptions","organizations_url":"https://api.github.com/users/tboerger/orgs","repos_url":"https://api.github.com/users/tboerger/repos","events_url":"https://api.github.com/users/tboerger/events{/privacy}","received_events_url":"https://api.github.com/users/tboerger/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tboerger/drone-go","description":"Go client for the Drone API","fork":true,"url":"https://api.github.com/repos/tboerger/drone-go","forks_url":"https://api.github.com/repos/tboerger/drone-go/forks","keys_url":"https://api.github.com/repos/tboerger/drone-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tboerger/drone-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tboerger/drone-go/teams","hooks_url":"https://api.github.com/repos/tboerger/drone-go/hooks","issue_events_url":"https://api.github.com/repos/tboerger/drone-go/issues/events{/number}","events_url":"https://api.github.com/repos/tboerger/drone-go/events","assignees_url":"https://api.github.com/repos/tboerger/drone-go/assignees{/user}","branches_url":"https://api.github.com/repos/tboerger/drone-go/branches{/branch}","tags_url":"https://api.github.com/repos/tboerger/drone-go/tags","blobs_url":"https://api.github.com/repos/tboerger/drone-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tboerger/drone-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tboerger/drone-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/tboerger/drone-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tboerger/drone-go/statuses/{sha}","languages_url":"https://api.github.com/repos/tboerger/drone-go/languages","stargazers_url":"https://api.github.com/repos/tboerger/drone-go/stargazers","contributors_url":"https://api.github.com/repos/tboerger/drone-go/contributors","subscribers_url":"https://api.github.com/repos/tboerger/drone-go/subscribers","subscription_url":"https://api.github.com/repos/tboerger/drone-go/subscription","commits_url":"https://api.github.com/repos/tboerger/drone-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/tboerger/drone-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/tboerger/drone-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/tboerger/drone-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/tboerger/drone-go/contents/{+path}","compare_url":"https://api.github.com/repos/tboerger/drone-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tboerger/drone-go/merges","archive_url":"https://api.github.com/repos/tboerger/drone-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tboerger/drone-go/downloads","issues_url":"https://api.github.com/repos/tboerger/drone-go/issues{/number}","pulls_url":"https://api.github.com/repos/tboerger/drone-go/pulls{/number}","milestones_url":"https://api.github.com/repos/tboerger/drone-go/milestones{/number}","notifications_url":"https://api.github.com/repos/tboerger/drone-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tboerger/drone-go/labels{/name}","releases_url":"https://api.github.com/repos/tboerger/drone-go/releases{/id}","deployments_url":"https://api.github.com/repos/tboerger/drone-go/deployments","created_at":"2016-01-01T13:18:03Z","updated_at":"2016-01-01T13:18:04Z","pushed_at":"2016-02-01T22:16:15Z","git_url":"git://github.com/tboerger/drone-go.git","ssh_url":"git@github.com:tboerger/drone-go.git","clone_url":"https://github.com/tboerger/drone-go.git","svn_url":"https://github.com/tboerger/drone-go","homepage":null,"size":38,"stargazers_count":0,"watchers_count":0,"language":"Go","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":"drone:master","ref":"master","sha":"087ffc5443db5e88c5cceeb0eae6d5df1bd96539","user":{"login":"drone","id":2181346,"avatar_url":"https://avatars.githubusercontent.com/u/2181346?v=3","gravatar_id":"","url":"https://api.github.com/users/drone","html_url":"https://github.com/drone","followers_url":"https://api.github.com/users/drone/followers","following_url":"https://api.github.com/users/drone/following{/other_user}","gists_url":"https://api.github.com/users/drone/gists{/gist_id}","starred_url":"https://api.github.com/users/drone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drone/subscriptions","organizations_url":"https://api.github.com/users/drone/orgs","repos_url":"https://api.github.com/users/drone/repos","events_url":"https://api.github.com/users/drone/events{/privacy}","received_events_url":"https://api.github.com/users/drone/received_events","type":"Organization","site_admin":false},"repo":{"id":30718272,"name":"drone-go","full_name":"drone/drone-go","owner":{"login":"drone","id":2181346,"avatar_url":"https://avatars.githubusercontent.com/u/2181346?v=3","gravatar_id":"","url":"https://api.github.com/users/drone","html_url":"https://github.com/drone","followers_url":"https://api.github.com/users/drone/followers","following_url":"https://api.github.com/users/drone/following{/other_user}","gists_url":"https://api.github.com/users/drone/gists{/gist_id}","starred_url":"https://api.github.com/users/drone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drone/subscriptions","organizations_url":"https://api.github.com/users/drone/orgs","repos_url":"https://api.github.com/users/drone/repos","events_url":"https://api.github.com/users/drone/events{/privacy}","received_events_url":"https://api.github.com/users/drone/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/drone/drone-go","description":"Go client for the Drone API","fork":false,"url":"https://api.github.com/repos/drone/drone-go","forks_url":"https://api.github.com/repos/drone/drone-go/forks","keys_url":"https://api.github.com/repos/drone/drone-go/keys{/key_id}","collaborators_url":"https://api.github.com/repos/drone/drone-go/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/drone/drone-go/teams","hooks_url":"https://api.github.com/repos/drone/drone-go/hooks","issue_events_url":"https://api.github.com/repos/drone/drone-go/issues/events{/number}","events_url":"https://api.github.com/repos/drone/drone-go/events","assignees_url":"https://api.github.com/repos/drone/drone-go/assignees{/user}","branches_url":"https://api.github.com/repos/drone/drone-go/branches{/branch}","tags_url":"https://api.github.com/repos/drone/drone-go/tags","blobs_url":"https://api.github.com/repos/drone/drone-go/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/drone/drone-go/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/drone/drone-go/git/refs{/sha}","trees_url":"https://api.github.com/repos/drone/drone-go/git/trees{/sha}","statuses_url":"https://api.github.com/repos/drone/drone-go/statuses/{sha}","languages_url":"https://api.github.com/repos/drone/drone-go/languages","stargazers_url":"https://api.github.com/repos/drone/drone-go/stargazers","contributors_url":"https://api.github.com/repos/drone/drone-go/contributors","subscribers_url":"https://api.github.com/repos/drone/drone-go/subscribers","subscription_url":"https://api.github.com/repos/drone/drone-go/subscription","commits_url":"https://api.github.com/repos/drone/drone-go/commits{/sha}","git_commits_url":"https://api.github.com/repos/drone/drone-go/git/commits{/sha}","comments_url":"https://api.github.com/repos/drone/drone-go/comments{/number}","issue_comment_url":"https://api.github.com/repos/drone/drone-go/issues/comments{/number}","contents_url":"https://api.github.com/repos/drone/drone-go/contents/{+path}","compare_url":"https://api.github.com/repos/drone/drone-go/compare/{base}...{head}","merges_url":"https://api.github.com/repos/drone/drone-go/merges","archive_url":"https://api.github.com/repos/drone/drone-go/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/drone/drone-go/downloads","issues_url":"https://api.github.com/repos/drone/drone-go/issues{/number}","pulls_url":"https://api.github.com/repos/drone/drone-go/pulls{/number}","milestones_url":"https://api.github.com/repos/drone/drone-go/milestones{/number}","notifications_url":"https://api.github.com/repos/drone/drone-go/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/drone/drone-go/labels{/name}","releases_url":"https://api.github.com/repos/drone/drone-go/releases{/id}","deployments_url":"https://api.github.com/repos/drone/drone-go/deployments","created_at":"2015-02-12T18:58:17Z","updated_at":"2016-01-11T13:59:44Z","pushed_at":"2016-02-01T22:16:16Z","git_url":"git://github.com/drone/drone-go.git","ssh_url":"git@github.com:drone/drone-go.git","clone_url":"https://github.com/drone/drone-go.git","svn_url":"https://github.com/drone/drone-go","homepage":null,"size":43,"stargazers_count":11,"watchers_count":11,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":13,"mirror_url":null,"open_issues_count":1,"forks":13,"open_issues":1,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/drone/drone-go/pulls/18"},"html":{"href":"https://github.com/drone/drone-go/pull/18"},"issue":{"href":"https://api.github.com/repos/drone/drone-go/issues/18"},"comments":{"href":"https://api.github.com/repos/drone/drone-go/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/drone/drone-go/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/drone/drone-go/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/drone/drone-go/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/drone/drone-go/statuses/33745ad06dbf9fdd6fad5bcef73e8ea79dae5b58"}}}}