{"action":"created","comment":{"url":"https://api.github.com/repos/robbporto/reshort/pulls/comments/226992389","pull_request_review_id":166932035,"id":226992389,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyNjk5MjM4OQ==","diff_hunk":"@@ -69,18 +69,52 @@ const mountRequest = (name, options) => (requestType, payload) => {\n     throw new Error(\"The request type name should be a string.\");\n \n   const typesOfActions = {\n-    request: () => ({\n-      type: mountConstant(name, \"request\", options),\n-      payload\n-    }),\n-    success: () => ({\n-      type: mountConstant(name, \"success\", options),\n-      payload\n-    }),\n-    fail: () => ({\n-      type: mountConstant(name, \"fail\", options),\n-      payload\n-    })\n+    request: () => {\n+      if (options && options.customSuccessPayload) {","path":"src/makeCompleteAction.js","position":null,"original_position":17,"commit_id":"6deb223bce187916cef3c9e2d268cc5d16528a23","original_commit_id":"c1edb391e3733819a1409338630a35e6dbb083d5","user":{"login":"gerbilsinspace","id":1398893,"node_id":"MDQ6VXNlcjEzOTg4OTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1398893?v=4","gravatar_id":"","url":"https://api.github.com/users/gerbilsinspace","html_url":"https://github.com/gerbilsinspace","followers_url":"https://api.github.com/users/gerbilsinspace/followers","following_url":"https://api.github.com/users/gerbilsinspace/following{/other_user}","gists_url":"https://api.github.com/users/gerbilsinspace/gists{/gist_id}","starred_url":"https://api.github.com/users/gerbilsinspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerbilsinspace/subscriptions","organizations_url":"https://api.github.com/users/gerbilsinspace/orgs","repos_url":"https://api.github.com/users/gerbilsinspace/repos","events_url":"https://api.github.com/users/gerbilsinspace/events{/privacy}","received_events_url":"https://api.github.com/users/gerbilsinspace/received_events","type":"User","site_admin":false},"body":"done","created_at":"2018-10-22T13:46:08Z","updated_at":"2018-10-22T13:46:08Z","html_url":"https://github.com/robbporto/reshort/pull/6#discussion_r226992389","pull_request_url":"https://api.github.com/repos/robbporto/reshort/pulls/6","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/robbporto/reshort/pulls/comments/226992389"},"html":{"href":"https://github.com/robbporto/reshort/pull/6#discussion_r226992389"},"pull_request":{"href":"https://api.github.com/repos/robbporto/reshort/pulls/6"}},"in_reply_to_id":226944376},"pull_request":{"url":"https://api.github.com/repos/robbporto/reshort/pulls/6","id":224571018,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI0NTcxMDE4","html_url":"https://github.com/robbporto/reshort/pull/6","diff_url":"https://github.com/robbporto/reshort/pull/6.diff","patch_url":"https://github.com/robbporto/reshort/pull/6.patch","issue_url":"https://api.github.com/repos/robbporto/reshort/issues/6","number":6,"state":"open","locked":false,"title":"Add options to shape how payloads are added to actions","user":{"login":"gerbilsinspace","id":1398893,"node_id":"MDQ6VXNlcjEzOTg4OTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1398893?v=4","gravatar_id":"","url":"https://api.github.com/users/gerbilsinspace","html_url":"https://github.com/gerbilsinspace","followers_url":"https://api.github.com/users/gerbilsinspace/followers","following_url":"https://api.github.com/users/gerbilsinspace/following{/other_user}","gists_url":"https://api.github.com/users/gerbilsinspace/gists{/gist_id}","starred_url":"https://api.github.com/users/gerbilsinspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerbilsinspace/subscriptions","organizations_url":"https://api.github.com/users/gerbilsinspace/orgs","repos_url":"https://api.github.com/users/gerbilsinspace/repos","events_url":"https://api.github.com/users/gerbilsinspace/events{/privacy}","received_events_url":"https://api.github.com/users/gerbilsinspace/received_events","type":"User","site_admin":false},"body":"First of all, thank you for your hard work!\r\n\r\nI want to use reshort, but I wanted to be able to control how payloads looked in actions. I don't like the convention of dumping any information into a `payload` variable, and would prefer to explicitly set what I want to store directly on the actions.\r\n\r\nI have created customSuccessPayload and customFailurePayload methods inside options, which take the payload, and returns the tweaked payload. The payload will be applied directly to the action, rather than given a payload wrapper.","created_at":"2018-10-21T21:40:01Z","updated_at":"2018-10-22T13:46:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8c88d00eaef80d2550f762efd69102fb6ecab43e","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/robbporto/reshort/pulls/6/commits","review_comments_url":"https://api.github.com/repos/robbporto/reshort/pulls/6/comments","review_comment_url":"https://api.github.com/repos/robbporto/reshort/pulls/comments{/number}","comments_url":"https://api.github.com/repos/robbporto/reshort/issues/6/comments","statuses_url":"https://api.github.com/repos/robbporto/reshort/statuses/6deb223bce187916cef3c9e2d268cc5d16528a23","head":{"label":"gerbilsinspace:master","ref":"master","sha":"6deb223bce187916cef3c9e2d268cc5d16528a23","user":{"login":"gerbilsinspace","id":1398893,"node_id":"MDQ6VXNlcjEzOTg4OTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1398893?v=4","gravatar_id":"","url":"https://api.github.com/users/gerbilsinspace","html_url":"https://github.com/gerbilsinspace","followers_url":"https://api.github.com/users/gerbilsinspace/followers","following_url":"https://api.github.com/users/gerbilsinspace/following{/other_user}","gists_url":"https://api.github.com/users/gerbilsinspace/gists{/gist_id}","starred_url":"https://api.github.com/users/gerbilsinspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerbilsinspace/subscriptions","organizations_url":"https://api.github.com/users/gerbilsinspace/orgs","repos_url":"https://api.github.com/users/gerbilsinspace/repos","events_url":"https://api.github.com/users/gerbilsinspace/events{/privacy}","received_events_url":"https://api.github.com/users/gerbilsinspace/received_events","type":"User","site_admin":false},"repo":{"id":153952917,"node_id":"MDEwOlJlcG9zaXRvcnkxNTM5NTI5MTc=","name":"reshort","full_name":"gerbilsinspace/reshort","private":false,"owner":{"login":"gerbilsinspace","id":1398893,"node_id":"MDQ6VXNlcjEzOTg4OTM=","avatar_url":"https://avatars1.githubusercontent.com/u/1398893?v=4","gravatar_id":"","url":"https://api.github.com/users/gerbilsinspace","html_url":"https://github.com/gerbilsinspace","followers_url":"https://api.github.com/users/gerbilsinspace/followers","following_url":"https://api.github.com/users/gerbilsinspace/following{/other_user}","gists_url":"https://api.github.com/users/gerbilsinspace/gists{/gist_id}","starred_url":"https://api.github.com/users/gerbilsinspace/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gerbilsinspace/subscriptions","organizations_url":"https://api.github.com/users/gerbilsinspace/orgs","repos_url":"https://api.github.com/users/gerbilsinspace/repos","events_url":"https://api.github.com/users/gerbilsinspace/events{/privacy}","received_events_url":"https://api.github.com/users/gerbilsinspace/received_events","type":"User","site_admin":false},"html_url":"https://github.com/gerbilsinspace/reshort","description":"Write less in your action creators! :scissors:","fork":true,"url":"https://api.github.com/repos/gerbilsinspace/reshort","forks_url":"https://api.github.com/repos/gerbilsinspace/reshort/forks","keys_url":"https://api.github.com/repos/gerbilsinspace/reshort/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gerbilsinspace/reshort/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gerbilsinspace/reshort/teams","hooks_url":"https://api.github.com/repos/gerbilsinspace/reshort/hooks","issue_events_url":"https://api.github.com/repos/gerbilsinspace/reshort/issues/events{/number}","events_url":"https://api.github.com/repos/gerbilsinspace/reshort/events","assignees_url":"https://api.github.com/repos/gerbilsinspace/reshort/assignees{/user}","branches_url":"https://api.github.com/repos/gerbilsinspace/reshort/branches{/branch}","tags_url":"https://api.github.com/repos/gerbilsinspace/reshort/tags","blobs_url":"https://api.github.com/repos/gerbilsinspace/reshort/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gerbilsinspace/reshort/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gerbilsinspace/reshort/git/refs{/sha}","trees_url":"https://api.github.com/repos/gerbilsinspace/reshort/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gerbilsinspace/reshort/statuses/{sha}","languages_url":"https://api.github.com/repos/gerbilsinspace/reshort/languages","stargazers_url":"https://api.github.com/repos/gerbilsinspace/reshort/stargazers","contributors_url":"https://api.github.com/repos/gerbilsinspace/reshort/contributors","subscribers_url":"https://api.github.com/repos/gerbilsinspace/reshort/subscribers","subscription_url":"https://api.github.com/repos/gerbilsinspace/reshort/subscription","commits_url":"https://api.github.com/repos/gerbilsinspace/reshort/commits{/sha}","git_commits_url":"https://api.github.com/repos/gerbilsinspace/reshort/git/commits{/sha}","comments_url":"https://api.github.com/repos/gerbilsinspace/reshort/comments{/number}","issue_comment_url":"https://api.github.com/repos/gerbilsinspace/reshort/issues/comments{/number}","contents_url":"https://api.github.com/repos/gerbilsinspace/reshort/contents/{+path}","compare_url":"https://api.github.com/repos/gerbilsinspace/reshort/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gerbilsinspace/reshort/merges","archive_url":"https://api.github.com/repos/gerbilsinspace/reshort/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gerbilsinspace/reshort/downloads","issues_url":"https://api.github.com/repos/gerbilsinspace/reshort/issues{/number}","pulls_url":"https://api.github.com/repos/gerbilsinspace/reshort/pulls{/number}","milestones_url":"https://api.github.com/repos/gerbilsinspace/reshort/milestones{/number}","notifications_url":"https://api.github.com/repos/gerbilsinspace/reshort/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gerbilsinspace/reshort/labels{/name}","releases_url":"https://api.github.com/repos/gerbilsinspace/reshort/releases{/id}","deployments_url":"https://api.github.com/repos/gerbilsinspace/reshort/deployments","created_at":"2018-10-20T22:12:48Z","updated_at":"2018-10-22T13:42:18Z","pushed_at":"2018-10-22T13:42:17Z","git_url":"git://github.com/gerbilsinspace/reshort.git","ssh_url":"git@github.com:gerbilsinspace/reshort.git","clone_url":"https://github.com/gerbilsinspace/reshort.git","svn_url":"https://github.com/gerbilsinspace/reshort","homepage":"","size":185,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":0,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"robbporto:master","ref":"master","sha":"5185a91a1c7d6da584cf61a3630909f0dcc9515c","user":{"login":"robbporto","id":12004796,"node_id":"MDQ6VXNlcjEyMDA0Nzk2","avatar_url":"https://avatars2.githubusercontent.com/u/12004796?v=4","gravatar_id":"","url":"https://api.github.com/users/robbporto","html_url":"https://github.com/robbporto","followers_url":"https://api.github.com/users/robbporto/followers","following_url":"https://api.github.com/users/robbporto/following{/other_user}","gists_url":"https://api.github.com/users/robbporto/gists{/gist_id}","starred_url":"https://api.github.com/users/robbporto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbporto/subscriptions","organizations_url":"https://api.github.com/users/robbporto/orgs","repos_url":"https://api.github.com/users/robbporto/repos","events_url":"https://api.github.com/users/robbporto/events{/privacy}","received_events_url":"https://api.github.com/users/robbporto/received_events","type":"User","site_admin":false},"repo":{"id":151784097,"node_id":"MDEwOlJlcG9zaXRvcnkxNTE3ODQwOTc=","name":"reshort","full_name":"robbporto/reshort","private":false,"owner":{"login":"robbporto","id":12004796,"node_id":"MDQ6VXNlcjEyMDA0Nzk2","avatar_url":"https://avatars2.githubusercontent.com/u/12004796?v=4","gravatar_id":"","url":"https://api.github.com/users/robbporto","html_url":"https://github.com/robbporto","followers_url":"https://api.github.com/users/robbporto/followers","following_url":"https://api.github.com/users/robbporto/following{/other_user}","gists_url":"https://api.github.com/users/robbporto/gists{/gist_id}","starred_url":"https://api.github.com/users/robbporto/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/robbporto/subscriptions","organizations_url":"https://api.github.com/users/robbporto/orgs","repos_url":"https://api.github.com/users/robbporto/repos","events_url":"https://api.github.com/users/robbporto/events{/privacy}","received_events_url":"https://api.github.com/users/robbporto/received_events","type":"User","site_admin":false},"html_url":"https://github.com/robbporto/reshort","description":"Write less in your action creators! :scissors:","fork":false,"url":"https://api.github.com/repos/robbporto/reshort","forks_url":"https://api.github.com/repos/robbporto/reshort/forks","keys_url":"https://api.github.com/repos/robbporto/reshort/keys{/key_id}","collaborators_url":"https://api.github.com/repos/robbporto/reshort/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/robbporto/reshort/teams","hooks_url":"https://api.github.com/repos/robbporto/reshort/hooks","issue_events_url":"https://api.github.com/repos/robbporto/reshort/issues/events{/number}","events_url":"https://api.github.com/repos/robbporto/reshort/events","assignees_url":"https://api.github.com/repos/robbporto/reshort/assignees{/user}","branches_url":"https://api.github.com/repos/robbporto/reshort/branches{/branch}","tags_url":"https://api.github.com/repos/robbporto/reshort/tags","blobs_url":"https://api.github.com/repos/robbporto/reshort/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/robbporto/reshort/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/robbporto/reshort/git/refs{/sha}","trees_url":"https://api.github.com/repos/robbporto/reshort/git/trees{/sha}","statuses_url":"https://api.github.com/repos/robbporto/reshort/statuses/{sha}","languages_url":"https://api.github.com/repos/robbporto/reshort/languages","stargazers_url":"https://api.github.com/repos/robbporto/reshort/stargazers","contributors_url":"https://api.github.com/repos/robbporto/reshort/contributors","subscribers_url":"https://api.github.com/repos/robbporto/reshort/subscribers","subscription_url":"https://api.github.com/repos/robbporto/reshort/subscription","commits_url":"https://api.github.com/repos/robbporto/reshort/commits{/sha}","git_commits_url":"https://api.github.com/repos/robbporto/reshort/git/commits{/sha}","comments_url":"https://api.github.com/repos/robbporto/reshort/comments{/number}","issue_comment_url":"https://api.github.com/repos/robbporto/reshort/issues/comments{/number}","contents_url":"https://api.github.com/repos/robbporto/reshort/contents/{+path}","compare_url":"https://api.github.com/repos/robbporto/reshort/compare/{base}...{head}","merges_url":"https://api.github.com/repos/robbporto/reshort/merges","archive_url":"https://api.github.com/repos/robbporto/reshort/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/robbporto/reshort/downloads","issues_url":"https://api.github.com/repos/robbporto/reshort/issues{/number}","pulls_url":"https://api.github.com/repos/robbporto/reshort/pulls{/number}","milestones_url":"https://api.github.com/repos/robbporto/reshort/milestones{/number}","notifications_url":"https://api.github.com/repos/robbporto/reshort/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/robbporto/reshort/labels{/name}","releases_url":"https://api.github.com/repos/robbporto/reshort/releases{/id}","deployments_url":"https://api.github.com/repos/robbporto/reshort/deployments","created_at":"2018-10-05T22:22:56Z","updated_at":"2018-10-22T03:36:07Z","pushed_at":"2018-10-22T13:34:26Z","git_url":"git://github.com/robbporto/reshort.git","ssh_url":"git@github.com:robbporto/reshort.git","clone_url":"https://github.com/robbporto/reshort.git","svn_url":"https://github.com/robbporto/reshort","homepage":"","size":181,"stargazers_count":14,"watchers_count":14,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":3,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":4,"open_issues":3,"watchers":14,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/robbporto/reshort/pulls/6"},"html":{"href":"https://github.com/robbporto/reshort/pull/6"},"issue":{"href":"https://api.github.com/repos/robbporto/reshort/issues/6"},"comments":{"href":"https://api.github.com/repos/robbporto/reshort/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/robbporto/reshort/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/robbporto/reshort/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/robbporto/reshort/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/robbporto/reshort/statuses/6deb223bce187916cef3c9e2d268cc5d16528a23"}},"author_association":"NONE"}}
{"actor":{"display_login":"gerbilsinspace"}}