{"action":"created","comment":{"url":"https://api.github.com/repos/eroispaziali/my-test-project/pulls/comments/61601076","id":61601076,"diff_hunk":"@@ -0,0 +1,323 @@\n+public with sharing class PobControllerExt {\n+\n+\t// Summary, filter, etc.\n+\tpublic String heading {get;set;}\n+\tpublic String categoryFilter {get;set;}\n+\tprivate static final String SOQL_WITHOUT_FILTER = 'SELECT Id, Name, Product__c, Product_Category__c, Unit_Price__c, Remaining__c FROM Lot__c WHERE (Remaining__c>0 OR Id in :existingLotsInThisOrder) ORDER BY Product__c ASC';\n+\tprivate static final String SOQL_WITH_FILTER = 'SELECT Id, Name, Product__c, Product_Category__c, Unit_Price__c, Remaining__c FROM Lot__c WHERE (Remaining__c>0 OR Id in :existingLotsInThisOrder) AND Product_Category__c = :categoryFilter ORDER BY Product__c ASC';\n+\tprivate static final Integer PAGE_SIZE = 5;\n+\t\n+\t// Records\n+\tpublic Order__c po {get;set;}\n+\tpublic List<Wrapper> wrappers {get;set;}\n+\n+\t@TestVisible \n+\tprivate Map<Id, Wrapper> wrappersMap = new Map<Id, Wrapper>();\n+\tprivate ApexPages.StandardSetController setCtrl;\n+\tprivate ApexPages.StandardController stdCtrl;\n+\tprivate Set<Id> existingLotsInThisOrder = new Set<Id>();\n+\tprivate boolean isExistingRecord = false;\n+\t\n+\t/** Extension constructor method */\n+\tpublic PobControllerExt(ApexPages.StandardController stdController) {\n+\t\tList<Line_Item__c> existingLineItems = null;\n+\t\tstdCtrl = stdController;\n+\t\tpo = (Order__c) stdCtrl.getRecord();\n+\t\tisExistingRecord = (po!=null && po.Id != null) ? true : false; \n+\t\tif (isExistingRecord) {\n+\t\t\theading = po.Name;\n+\t\t\texistingLineItems = [SELECT Units__c, Lot__c, Amount__c FROM Line_Item__c WHERE Order__c = :po.Id];\n+\t\t} else {\n+\t\t\theading = Label.POB_Heading_New;\n+\t\t}\n+\t\tinit(existingLineItems);\n+\t\tresetFilter();\n+\t}\n+\n+\t\n+\t/* Public methods\n+\t========================= */\n+\n+\t/** Used on the Visualforce page to display editable/non editable name */\t\n+\tpublic boolean getNameIsEditable() {\n+\t\treturn (po.Id==null || po.Status__c != 'Closed') ? true : false;\n+\t}\n+\t\n+\t/** Used on the Visualforce page to display editable/non editable budget */\n+\tpublic boolean getBudgetIsEditable() {\n+\t\treturn (po.Id==null || po.Status__c == 'Draft') ? true : false;\n+\t}\n+\t\n+\t/** Used on the Visualforce page to display editable/non editable status */\n+\tpublic boolean getStatusIsEditable() {\n+\t\treturn (po.Id==null || po.Status__c != 'Closed') ? true : false;\n+\t}\n+\t\n+\t/** Used on the Visualforce page to display editable/non editable units */\t\n+\tpublic boolean getUnitsAreEditable() {\n+\t\treturn (po.Id==null || po.Status__c != 'Closed') ? true : false;\n+\t}\n+\t\n+\t/** Populates the possibile filter values by retrieving picklist values\n+\t\tfrom the object\n+\t */\n+\tpublic List<SelectOption> getFilterValues () {\n+\t\tList<SelectOption> options = new List<SelectOption>();\n+\t\toptions.add(new SelectOption('', Label.POB_NoFilter));\n+\t\tSchema.DescribeFieldResult fd = Lot__c.Product_Category__c.getDescribe();\n+\t\tfor (Schema.PicklistEntry ple : fd.getPicklistValues()) {\n+\t\t\toptions.add(new SelectOption(ple.value, ple.label));\n+\t\t}\n+\t\treturn options;\n+\t}\n+\t\n+\t/** Lots pagination. Moves to the first page */\n+\tpublic void firstPage() {\n+\t\tsetCtrl.first();\n+\t\trefreshWrappers();\n+\t}\n+\t\n+\t/** Lots pagination. Moves to the last page */\n+\tpublic void lastPage() { \n+\t\tsetCtrl.last();\n+\t\trefreshWrappers();\n+\t}\n+\t\n+\t/** Lots pagination. Is the [previous] button disabled? */\n+\tpublic boolean getPrevDisabled() {\n+\t\treturn !setCtrl.getHasPrevious();\n+\t}\n+\t\n+\t/** Lots pagination. Is the [next] button disabled? */\n+\tpublic boolean getNextDisabled() {\n+\t\treturn !setCtrl.getHasNext();\n+\t}\n+\t\n+\t/** Lots pagination. Returns the number of lot pages */\n+\tpublic Integer getNumberOfPages() {\n+\t\tInteger recordCount = setCtrl.getResultSize();\n+\t\tInteger pageSize = setCtrl.getPageSize();\n+\t\treturn recordCount / pageSize + ( Math.mod(recordCount, pageSize) > 0 ? 1 : 0);\n+\t}\n+\t\n+\t/** Lots pagination. Returns the current page */\n+\tpublic Integer getCurrentPage() {\n+\t\treturn setCtrl.getPageNumber();\n+\t}\n+\t\n+\t/** Lots pagination. Moves to the next page */\n+\tpublic void nextPage() {\n+\t\tif (setCtrl.getHasNext()) {\n+\t\t\tsetCtrl.next();\n+\t\t\trefreshWrappers();\n+\t\t}\n+\t}\n+\t\n+\t/** Lots pagination. Moves to the previous page */\n+\tpublic void prevPage() {\n+\t\tif (setCtrl.getHasPrevious()) {\n+\t\t\tsetCtrl.previous();\n+\t\t\trefreshWrappers();\n+\t\t}\n+\t}\n+\t\n+\t/** Forces the selection (number of units) to be re-evaluated */\n+\tpublic void updateSelection() {\n+\t\trefreshWrappers();\n+\t}\n+\t\n+\t/** SUMMARY. Returns the number of units\n+\t==========================================================================================================================================\n+\tIMPORTANT NOTE: Requirement states \"[..] as shown in Figure 1 Account Managers will be able to see summary stats for the purchase Order\". \n+\tMy assumption is that the status has to be maintained based in real time with what is being added/removed to the order\n+\tusing the purchase order builder, so that the summary reflects what the order will be once saved.\n+\t========================================================================================================================================== */\n+\tpublic Decimal getUnits() {\n+\t\tDecimal totalUnits = 0;\n+\t\tfor (Wrapper w : wrappersMap.values()) {\n+\t\t\ttotalUnits+=w.units;\n+\t\t}\n+\t\treturn totalUnits;\n+\t}\n+\t\n+\t/** SUMMARY. Returns the price per unit\n+\t==========================================================================================================================================\n+\tIMPORTANT NOTE: Requirement states \"[..] as shown in Figure 1 Account Managers will be able to see summary stats for the purchase Order\". \n+\tMy assumption is that the status has to be maintained based in real time with what is being added/removed to the order\n+\tusing the purchase order builder, so that the summary reflects what the order will be once saved.\n+\t========================================================================================================================================== */\n+\tpublic Decimal getPricePerUnit() {\n+\t\tDecimal totalCost = 0;\n+\t\tDecimal totalUnits = 0;\n+\t\tfor (Wrapper w : wrappersMap.values()) {\n+\t\t\ttotalCost += w.product.Unit_Price__c * w.units; \n+\t\t\ttotalUnits+=w.units;\n+\t\t}\n+\t\treturn (totalUnits!=0) ? totalCost/totalUnits : null;\n+\t}\n+\t\n+\t/** FILTER. Resets the current filter so it's OFF */\n+\tpublic void resetFilter() {\n+\t\tcategoryFilter = '';\n+\t\tupdateFilter();\n+\t}\n+\t\n+\t/** FILTER. Updates and applies the filter on lots*/\n+\tpublic void updateFilter() {\n+\t\tString soql = (isFilterEnabled()) ? SOQL_WITH_FILTER : SOQL_WITHOUT_FILTER;\n+\t\tsetCtrl = new ApexPages.StandardSetController(Database.getQueryLocator(soql));\n+\t\tsetCtrl.setPageSize(PAGE_SIZE);\n+\t\trefreshWrappers();\n+\t}\n+\t\n+\t/** Saves and order */\n+\tpublic PageReference save() {\n+\t\tSavepoint sp = Database.setSavepoint();\n+\t\ttry {\n+\t\t\t// create or update purchase order\n+\t\t\tupsert po;\n+\t\t\t\n+\t\t\t// which line items to be deleted or upserted?\n+\t\t\tList<Line_Item__c> toBeDeleted = new List<Line_Item__c>();\n+\t\t\tList<Line_Item__c> toBeUpserted = new List<Line_Item__c>();\n+\t\t\tfor (Wrapper w : wrappersMap.values()) {\n+\t\t\t\tif (w.units > 0) {\n+\t\t\t\t\tw.lineItem.Order__c = po.Id;\n+\t\t\t\t\ttoBeUpserted.add(w.lineItem);\n+\t\t\t\t} else if (w.units == 0 && w.lineItem.Id!=null) {\n+\t\t\t\t\ttoBeDeleted.add(w.lineItem);\n+\t\t\t\t}\n+\t\t\t} \n+\t\t\t\n+\t\t\t// delete & upsert line items\n+\t\t\tdelete toBeDeleted;\n+\t\t\t\n+\t\t\t// UPSERT, check outcome on this...\n+\t\t\tList<Database.UpsertResult> uResults = Database.upsert(toBeUpserted, false);\n+\t\t\tfor (Integer i=0; i<uResults.size(); i++) {\n+\t\t\t    if (!uResults[i].isSuccess()) {\n+\t\t\t        for (Database.Error e : uResults[i].getErrors()) {\n+\t\t\t        \t\n+\t\t\t        \t// Validation messages are friendly enough so will be displayed\n+\t\t\t        \t// Other errors are replaced by a friendly error message\n+\t\t\t        \t// to be placed both on fields and at page level\n+\t\t\t        \tString friendlyMessage = \n+\t\t\t        \t\t(e.getStatusCode() == StatusCode.FIELD_CUSTOM_VALIDATION_EXCEPTION) \n+\t\t\t        \t\t? e.getMessage() : Label.POB_Friendly_Error_LineItem;\n+\t\t\t        \t\t\n+\t\t\t\t\t\ttoBeUpserted[i].Units__c.addError(friendlyMessage);\t\t\t        \t\n+\t\t\t        \tApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR, friendlyMessage));\n+\t\t\t        }\n+\t\t\t        throw new SaveException('Error while saving line items');\n+\t\t\t    }\n+\t\t\t}\n+\t\t\t\n+\t\t\t// All good, go to record view page\n+\t\t\treturn new ApexPages.StandardController(po).view();\n+\t\t\t  \n+\t\t} catch (SaveException e) {\n+\t\t\thandleRollback(sp);\n+\t\t\treturn null;\n+\t\t\t\n+\t\t} catch (DmlException e) {\n+\t\t\thandleRollback(sp);\n+\t\t\treturn null;\n+\t\t\t\n+\t\t} catch (Exception e) {\n+\t\t\t// Generic, unexpected exception: rollback and add friendly message\n+\t\t\t// then stay on the same page\n+\t\t\tApexPages.addMessage(new ApexPages.message(ApexPages.severity.ERROR, Label.POB_Friendly_Error_Message));\n+\t\t\thandleRollback(sp);\n+\t\t\treturn null;\n+\t\t}\n+\t}\n+\t\n+\t/** TRANSACTION ROLLBACK\n+\t\t=======================================================================================================\n+\t\tImportant note. As described in the documentation \"The ID on an sObject inserted after setting a\n+\t\tsavepoint is not cleared after a rollback.\".\n+\t\tSee: https://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_transaction_control.htm\n+\t\t\n+\t\tThis simple method rollbacks and clears order IDs to avoid INVALID_CROSS_REFERENCE_KEY in subsequent \n+\t\tsave attempts.\n+\t\t======================================================================================================= */\n+\tprivate void handleRollback(Savepoint sp) {\n+\t\t\n+\t\t// Rollback savepoint\n+\t\tDatabase.rollback(sp);\n+\t\t\n+\t\t// If this is NOT a new order I should get rid\n+\t\t// of IDs in the po use clone method to get rid of IDs\n+\t\tif (isExistingRecord == false) {\n+\t\t\tpo = po.clone(false);\n+\t\t}\n+\t} \n+\t\n+\t/* Utility methods (not exposed)\n+\t================================== */\n+\t\n+\t/** Prepopulates wrapperMap with existing line items (if any).\n+\t\tThe wrapperMap property is used to keep the state\n+\t\tof the selection (number of units) */\t\n+\tprivate void init(List<Line_Item__c> existingLineItems) {\n+\t\twrappersMap = new Map<Id, Wrapper>();\n+\t\tMap<Id, Line_Item__c> lot2Item = new Map<Id, Line_Item__c>();\n+\t\tSet<Id> lotIds = new Set<Id>();\n+\t\tif (existingLineItems!=null) {\n+\t\t\tfor (Line_Item__c l : existingLineItems) {\n+\t\t\t\tlotIds.add(l.Lot__c);\n+\t\t\t\tlot2Item.put(l.Lot__c, l);\n+\t\t\t\texistingLotsInThisOrder.add(l.Lot__c);\n+\t\t\t}\n+\t\t}\n+\t\tList<Lot__c> lots = [SELECT Id, Name, Product__c, Product_Category__c, Unit_Price__c, Remaining__c FROM Lot__c WHERE Id in :lotIds];","path":"src/classes/PobControllerExt.cls","position":273,"original_position":273,"commit_id":"4161a2b4c905516cd0c690f694b04ae2e7c87569","original_commit_id":"4161a2b4c905516cd0c690f694b04ae2e7c87569","user":{"login":"eroispaziali","id":1273282,"avatar_url":"https://avatars.githubusercontent.com/u/1273282?v=3","gravatar_id":"","url":"https://api.github.com/users/eroispaziali","html_url":"https://github.com/eroispaziali","followers_url":"https://api.github.com/users/eroispaziali/followers","following_url":"https://api.github.com/users/eroispaziali/following{/other_user}","gists_url":"https://api.github.com/users/eroispaziali/gists{/gist_id}","starred_url":"https://api.github.com/users/eroispaziali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eroispaziali/subscriptions","organizations_url":"https://api.github.com/users/eroispaziali/orgs","repos_url":"https://api.github.com/users/eroispaziali/repos","events_url":"https://api.github.com/users/eroispaziali/events{/privacy}","received_events_url":"https://api.github.com/users/eroispaziali/received_events","type":"User","site_admin":false},"body":"Problem: Unbound SOQL query. Reason: a SOQL query can return up to 50,000 records. If this number is exceeded a runtime exception is thrown. Suggestion: cap the max number of records returned adding a LIMIT clause to the query.","created_at":"2016-04-29T16:01:17Z","updated_at":"2016-04-29T16:01:17Z","html_url":"https://github.com/eroispaziali/my-test-project/pull/1#discussion_r61601076","pull_request_url":"https://api.github.com/repos/eroispaziali/my-test-project/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/eroispaziali/my-test-project/pulls/comments/61601076"},"html":{"href":"https://github.com/eroispaziali/my-test-project/pull/1#discussion_r61601076"},"pull_request":{"href":"https://api.github.com/repos/eroispaziali/my-test-project/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/eroispaziali/my-test-project/pulls/1","id":68394285,"html_url":"https://github.com/eroispaziali/my-test-project/pull/1","diff_url":"https://github.com/eroispaziali/my-test-project/pull/1.diff","patch_url":"https://github.com/eroispaziali/my-test-project/pull/1.patch","issue_url":"https://api.github.com/repos/eroispaziali/my-test-project/issues/1","number":1,"state":"open","locked":false,"title":"new stuff","user":{"login":"eroispaziali","id":1273282,"avatar_url":"https://avatars.githubusercontent.com/u/1273282?v=3","gravatar_id":"","url":"https://api.github.com/users/eroispaziali","html_url":"https://github.com/eroispaziali","followers_url":"https://api.github.com/users/eroispaziali/followers","following_url":"https://api.github.com/users/eroispaziali/following{/other_user}","gists_url":"https://api.github.com/users/eroispaziali/gists{/gist_id}","starred_url":"https://api.github.com/users/eroispaziali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eroispaziali/subscriptions","organizations_url":"https://api.github.com/users/eroispaziali/orgs","repos_url":"https://api.github.com/users/eroispaziali/repos","events_url":"https://api.github.com/users/eroispaziali/events{/privacy}","received_events_url":"https://api.github.com/users/eroispaziali/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-29T16:00:10Z","updated_at":"2016-04-29T16:01:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f0704b58a476c1f67339501ccb9313a299cccb70","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/eroispaziali/my-test-project/pulls/1/commits","review_comments_url":"https://api.github.com/repos/eroispaziali/my-test-project/pulls/1/comments","review_comment_url":"https://api.github.com/repos/eroispaziali/my-test-project/pulls/comments{/number}","comments_url":"https://api.github.com/repos/eroispaziali/my-test-project/issues/1/comments","statuses_url":"https://api.github.com/repos/eroispaziali/my-test-project/statuses/4161a2b4c905516cd0c690f694b04ae2e7c87569","head":{"label":"eroispaziali:trunk","ref":"trunk","sha":"4161a2b4c905516cd0c690f694b04ae2e7c87569","user":{"login":"eroispaziali","id":1273282,"avatar_url":"https://avatars.githubusercontent.com/u/1273282?v=3","gravatar_id":"","url":"https://api.github.com/users/eroispaziali","html_url":"https://github.com/eroispaziali","followers_url":"https://api.github.com/users/eroispaziali/followers","following_url":"https://api.github.com/users/eroispaziali/following{/other_user}","gists_url":"https://api.github.com/users/eroispaziali/gists{/gist_id}","starred_url":"https://api.github.com/users/eroispaziali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eroispaziali/subscriptions","organizations_url":"https://api.github.com/users/eroispaziali/orgs","repos_url":"https://api.github.com/users/eroispaziali/repos","events_url":"https://api.github.com/users/eroispaziali/events{/privacy}","received_events_url":"https://api.github.com/users/eroispaziali/received_events","type":"User","site_admin":false},"repo":{"id":57395407,"name":"my-test-project","full_name":"eroispaziali/my-test-project","owner":{"login":"eroispaziali","id":1273282,"avatar_url":"https://avatars.githubusercontent.com/u/1273282?v=3","gravatar_id":"","url":"https://api.github.com/users/eroispaziali","html_url":"https://github.com/eroispaziali","followers_url":"https://api.github.com/users/eroispaziali/followers","following_url":"https://api.github.com/users/eroispaziali/following{/other_user}","gists_url":"https://api.github.com/users/eroispaziali/gists{/gist_id}","starred_url":"https://api.github.com/users/eroispaziali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eroispaziali/subscriptions","organizations_url":"https://api.github.com/users/eroispaziali/orgs","repos_url":"https://api.github.com/users/eroispaziali/repos","events_url":"https://api.github.com/users/eroispaziali/events{/privacy}","received_events_url":"https://api.github.com/users/eroispaziali/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eroispaziali/my-test-project","description":"A test project, nothing really interesting.","fork":false,"url":"https://api.github.com/repos/eroispaziali/my-test-project","forks_url":"https://api.github.com/repos/eroispaziali/my-test-project/forks","keys_url":"https://api.github.com/repos/eroispaziali/my-test-project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eroispaziali/my-test-project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eroispaziali/my-test-project/teams","hooks_url":"https://api.github.com/repos/eroispaziali/my-test-project/hooks","issue_events_url":"https://api.github.com/repos/eroispaziali/my-test-project/issues/events{/number}","events_url":"https://api.github.com/repos/eroispaziali/my-test-project/events","assignees_url":"https://api.github.com/repos/eroispaziali/my-test-project/assignees{/user}","branches_url":"https://api.github.com/repos/eroispaziali/my-test-project/branches{/branch}","tags_url":"https://api.github.com/repos/eroispaziali/my-test-project/tags","blobs_url":"https://api.github.com/repos/eroispaziali/my-test-project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eroispaziali/my-test-project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eroispaziali/my-test-project/git/refs{/sha}","trees_url":"https://api.github.com/repos/eroispaziali/my-test-project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eroispaziali/my-test-project/statuses/{sha}","languages_url":"https://api.github.com/repos/eroispaziali/my-test-project/languages","stargazers_url":"https://api.github.com/repos/eroispaziali/my-test-project/stargazers","contributors_url":"https://api.github.com/repos/eroispaziali/my-test-project/contributors","subscribers_url":"https://api.github.com/repos/eroispaziali/my-test-project/subscribers","subscription_url":"https://api.github.com/repos/eroispaziali/my-test-project/subscription","commits_url":"https://api.github.com/repos/eroispaziali/my-test-project/commits{/sha}","git_commits_url":"https://api.github.com/repos/eroispaziali/my-test-project/git/commits{/sha}","comments_url":"https://api.github.com/repos/eroispaziali/my-test-project/comments{/number}","issue_comment_url":"https://api.github.com/repos/eroispaziali/my-test-project/issues/comments{/number}","contents_url":"https://api.github.com/repos/eroispaziali/my-test-project/contents/{+path}","compare_url":"https://api.github.com/repos/eroispaziali/my-test-project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eroispaziali/my-test-project/merges","archive_url":"https://api.github.com/repos/eroispaziali/my-test-project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eroispaziali/my-test-project/downloads","issues_url":"https://api.github.com/repos/eroispaziali/my-test-project/issues{/number}","pulls_url":"https://api.github.com/repos/eroispaziali/my-test-project/pulls{/number}","milestones_url":"https://api.github.com/repos/eroispaziali/my-test-project/milestones{/number}","notifications_url":"https://api.github.com/repos/eroispaziali/my-test-project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eroispaziali/my-test-project/labels{/name}","releases_url":"https://api.github.com/repos/eroispaziali/my-test-project/releases{/id}","deployments_url":"https://api.github.com/repos/eroispaziali/my-test-project/deployments","created_at":"2016-04-29T15:41:45Z","updated_at":"2016-04-29T15:41:45Z","pushed_at":"2016-04-29T16:00:10Z","git_url":"git://github.com/eroispaziali/my-test-project.git","ssh_url":"git@github.com:eroispaziali/my-test-project.git","clone_url":"https://github.com/eroispaziali/my-test-project.git","svn_url":"https://github.com/eroispaziali/my-test-project","homepage":null,"size":19,"stargazers_count":0,"watchers_count":0,"language":null,"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":0,"default_branch":"trunk"}},"base":{"label":"eroispaziali:master","ref":"master","sha":"e9ba4a5bc8ef93b4b8b678d1fb8d92f8cc8c2d3d","user":{"login":"eroispaziali","id":1273282,"avatar_url":"https://avatars.githubusercontent.com/u/1273282?v=3","gravatar_id":"","url":"https://api.github.com/users/eroispaziali","html_url":"https://github.com/eroispaziali","followers_url":"https://api.github.com/users/eroispaziali/followers","following_url":"https://api.github.com/users/eroispaziali/following{/other_user}","gists_url":"https://api.github.com/users/eroispaziali/gists{/gist_id}","starred_url":"https://api.github.com/users/eroispaziali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eroispaziali/subscriptions","organizations_url":"https://api.github.com/users/eroispaziali/orgs","repos_url":"https://api.github.com/users/eroispaziali/repos","events_url":"https://api.github.com/users/eroispaziali/events{/privacy}","received_events_url":"https://api.github.com/users/eroispaziali/received_events","type":"User","site_admin":false},"repo":{"id":57395407,"name":"my-test-project","full_name":"eroispaziali/my-test-project","owner":{"login":"eroispaziali","id":1273282,"avatar_url":"https://avatars.githubusercontent.com/u/1273282?v=3","gravatar_id":"","url":"https://api.github.com/users/eroispaziali","html_url":"https://github.com/eroispaziali","followers_url":"https://api.github.com/users/eroispaziali/followers","following_url":"https://api.github.com/users/eroispaziali/following{/other_user}","gists_url":"https://api.github.com/users/eroispaziali/gists{/gist_id}","starred_url":"https://api.github.com/users/eroispaziali/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eroispaziali/subscriptions","organizations_url":"https://api.github.com/users/eroispaziali/orgs","repos_url":"https://api.github.com/users/eroispaziali/repos","events_url":"https://api.github.com/users/eroispaziali/events{/privacy}","received_events_url":"https://api.github.com/users/eroispaziali/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/eroispaziali/my-test-project","description":"A test project, nothing really interesting.","fork":false,"url":"https://api.github.com/repos/eroispaziali/my-test-project","forks_url":"https://api.github.com/repos/eroispaziali/my-test-project/forks","keys_url":"https://api.github.com/repos/eroispaziali/my-test-project/keys{/key_id}","collaborators_url":"https://api.github.com/repos/eroispaziali/my-test-project/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/eroispaziali/my-test-project/teams","hooks_url":"https://api.github.com/repos/eroispaziali/my-test-project/hooks","issue_events_url":"https://api.github.com/repos/eroispaziali/my-test-project/issues/events{/number}","events_url":"https://api.github.com/repos/eroispaziali/my-test-project/events","assignees_url":"https://api.github.com/repos/eroispaziali/my-test-project/assignees{/user}","branches_url":"https://api.github.com/repos/eroispaziali/my-test-project/branches{/branch}","tags_url":"https://api.github.com/repos/eroispaziali/my-test-project/tags","blobs_url":"https://api.github.com/repos/eroispaziali/my-test-project/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/eroispaziali/my-test-project/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/eroispaziali/my-test-project/git/refs{/sha}","trees_url":"https://api.github.com/repos/eroispaziali/my-test-project/git/trees{/sha}","statuses_url":"https://api.github.com/repos/eroispaziali/my-test-project/statuses/{sha}","languages_url":"https://api.github.com/repos/eroispaziali/my-test-project/languages","stargazers_url":"https://api.github.com/repos/eroispaziali/my-test-project/stargazers","contributors_url":"https://api.github.com/repos/eroispaziali/my-test-project/contributors","subscribers_url":"https://api.github.com/repos/eroispaziali/my-test-project/subscribers","subscription_url":"https://api.github.com/repos/eroispaziali/my-test-project/subscription","commits_url":"https://api.github.com/repos/eroispaziali/my-test-project/commits{/sha}","git_commits_url":"https://api.github.com/repos/eroispaziali/my-test-project/git/commits{/sha}","comments_url":"https://api.github.com/repos/eroispaziali/my-test-project/comments{/number}","issue_comment_url":"https://api.github.com/repos/eroispaziali/my-test-project/issues/comments{/number}","contents_url":"https://api.github.com/repos/eroispaziali/my-test-project/contents/{+path}","compare_url":"https://api.github.com/repos/eroispaziali/my-test-project/compare/{base}...{head}","merges_url":"https://api.github.com/repos/eroispaziali/my-test-project/merges","archive_url":"https://api.github.com/repos/eroispaziali/my-test-project/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/eroispaziali/my-test-project/downloads","issues_url":"https://api.github.com/repos/eroispaziali/my-test-project/issues{/number}","pulls_url":"https://api.github.com/repos/eroispaziali/my-test-project/pulls{/number}","milestones_url":"https://api.github.com/repos/eroispaziali/my-test-project/milestones{/number}","notifications_url":"https://api.github.com/repos/eroispaziali/my-test-project/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/eroispaziali/my-test-project/labels{/name}","releases_url":"https://api.github.com/repos/eroispaziali/my-test-project/releases{/id}","deployments_url":"https://api.github.com/repos/eroispaziali/my-test-project/deployments","created_at":"2016-04-29T15:41:45Z","updated_at":"2016-04-29T15:41:45Z","pushed_at":"2016-04-29T16:00:10Z","git_url":"git://github.com/eroispaziali/my-test-project.git","ssh_url":"git@github.com:eroispaziali/my-test-project.git","clone_url":"https://github.com/eroispaziali/my-test-project.git","svn_url":"https://github.com/eroispaziali/my-test-project","homepage":null,"size":19,"stargazers_count":0,"watchers_count":0,"language":null,"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":0,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/eroispaziali/my-test-project/pulls/1"},"html":{"href":"https://github.com/eroispaziali/my-test-project/pull/1"},"issue":{"href":"https://api.github.com/repos/eroispaziali/my-test-project/issues/1"},"comments":{"href":"https://api.github.com/repos/eroispaziali/my-test-project/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/eroispaziali/my-test-project/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/eroispaziali/my-test-project/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/eroispaziali/my-test-project/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/eroispaziali/my-test-project/statuses/4161a2b4c905516cd0c690f694b04ae2e7c87569"}}}}