{"action":"created","comment":{"url":"https://api.github.com/repos/adobe/hypermedia-pipeline/pulls/comments/214290944","pull_request_review_id":151315171,"id":214290944,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNDI5MDk0NA==","diff_hunk":"@@ -36,36 +36,35 @@ function pipe(next, params, constants, logger) {\n const pre = cont => cont;\n \n /**\n- * A standard cleanup function that takes OpenWhisk-style parameters and turns\n- * them into an Express-style request object which is returned.\n- * @param {Object} params Parameters following OpenWhisk convention, including\n- * __ow_method and __ow_headers for HTTP requests\n- * @returns {Object} A req object that is equivalent to an Express request object,\n+ * A function that takes OpenWhisk-style req parameter and turns\n+ * it into the original Express-style request object which is returned.\n+ * @param {Object} payload Pipeline payload\n+ * @param {Object} action Object representing the OpenWhisk action, including\n+ * the request, __ow_method and __ow_headers for HTTP requests and secrets\n+ * @returns {Object} The original req object that is equivalent to an Express request object,\n  * including a headers, method, and params field\n  */\n-function adaptOWRequest(params) {\n-  // use destructuring to drop __ow_headers and __ow_method from params\n-  /* eslint-disable camelcase, no-underscore-dangle */\n-  const { __ow_headers, __ow_method, ...newparams } = params;\n-\n-  return {\n-    request: {\n-      headers: __ow_headers,\n-      params: newparams,\n-      method: __ow_method,\n-    },\n-  };\n-  /* eslint-enable: camelcase, no-underscore-dangle */\n+function adaptOWRequest(payload, { request: { params: { req = '{}' } } }, logger) {","path":"src/defaults/default.js","position":50,"original_position":50,"commit_id":"eabca3bda08077020f627b14b02e6e08d8453f49","original_commit_id":"eabca3bda08077020f627b14b02e6e08d8453f49","user":{"login":"tripodsan","id":917628,"node_id":"MDQ6VXNlcjkxNzYyOA==","avatar_url":"https://avatars3.githubusercontent.com/u/917628?v=4","gravatar_id":"","url":"https://api.github.com/users/tripodsan","html_url":"https://github.com/tripodsan","followers_url":"https://api.github.com/users/tripodsan/followers","following_url":"https://api.github.com/users/tripodsan/following{/other_user}","gists_url":"https://api.github.com/users/tripodsan/gists{/gist_id}","starred_url":"https://api.github.com/users/tripodsan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tripodsan/subscriptions","organizations_url":"https://api.github.com/users/tripodsan/orgs","repos_url":"https://api.github.com/users/tripodsan/repos","events_url":"https://api.github.com/users/tripodsan/events{/privacy}","received_events_url":"https://api.github.com/users/tripodsan/received_events","type":"User","site_admin":false},"body":"hmm..this is very asymmetric. on the one hand, the pipeline now uses payload/action, but the entry and exit functions need to know about openwhisk.\r\n\r\nmaybe this should be done in helix-cli, and not in the pipeline. this way, the pipeline could remain _container function_ agnostic.\r\n\r\nbut then, we need to rename `action` again, to... maybe... `context` ? (as in execution context)","created_at":"2018-08-31T09:12:52Z","updated_at":"2018-08-31T09:17:42Z","html_url":"https://github.com/adobe/hypermedia-pipeline/pull/35#discussion_r214290944","pull_request_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/pulls/35","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/adobe/hypermedia-pipeline/pulls/comments/214290944"},"html":{"href":"https://github.com/adobe/hypermedia-pipeline/pull/35#discussion_r214290944"},"pull_request":{"href":"https://api.github.com/repos/adobe/hypermedia-pipeline/pulls/35"}}},"pull_request":{"url":"https://api.github.com/repos/adobe/hypermedia-pipeline/pulls/35","id":212301907,"node_id":"MDExOlB1bGxSZXF1ZXN0MjEyMzAxOTA3","html_url":"https://github.com/adobe/hypermedia-pipeline/pull/35","diff_url":"https://github.com/adobe/hypermedia-pipeline/pull/35.diff","patch_url":"https://github.com/adobe/hypermedia-pipeline/pull/35.patch","issue_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/issues/35","number":35,"state":"open","locked":false,"title":"Payload and action","user":{"login":"kptdobe","id":474200,"node_id":"MDQ6VXNlcjQ3NDIwMA==","avatar_url":"https://avatars3.githubusercontent.com/u/474200?v=4","gravatar_id":"","url":"https://api.github.com/users/kptdobe","html_url":"https://github.com/kptdobe","followers_url":"https://api.github.com/users/kptdobe/followers","following_url":"https://api.github.com/users/kptdobe/following{/other_user}","gists_url":"https://api.github.com/users/kptdobe/gists{/gist_id}","starred_url":"https://api.github.com/users/kptdobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kptdobe/subscriptions","organizations_url":"https://api.github.com/users/kptdobe/orgs","repos_url":"https://api.github.com/users/kptdobe/repos","events_url":"https://api.github.com/users/kptdobe/events{/privacy}","received_events_url":"https://api.github.com/users/kptdobe/received_events","type":"User","site_admin":false},"body":"PR for #7 \r\n\r\n- rename all parameters to `payload` and `action` (for consistency)\r\n- handle new location of OW params (from `payload` to `action.request.params`)\r\n- repurpose `adaptOWRequest` to parse new incoming `req` action parameter and instantiate `payload.request` object as the original request.\r\n\r\nCorresponding changes in other repos to come...\r\n\r\nAnd tests will be adjusted after agreement with the team...","created_at":"2018-08-31T07:52:00Z","updated_at":"2018-08-31T09:17:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4883f4dc7203da8050cd341605203564a8bbaf44","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/pulls/35/commits","review_comments_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/pulls/35/comments","review_comment_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/pulls/comments{/number}","comments_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/issues/35/comments","statuses_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/statuses/eabca3bda08077020f627b14b02e6e08d8453f49","head":{"label":"adobe:issues/7","ref":"issues/7","sha":"eabca3bda08077020f627b14b02e6e08d8453f49","user":{"login":"adobe","id":476009,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NjAwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/476009?v=4","gravatar_id":"","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"repo":{"id":138998076,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg5OTgwNzY=","name":"hypermedia-pipeline","full_name":"adobe/hypermedia-pipeline","owner":{"login":"adobe","id":476009,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NjAwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/476009?v=4","gravatar_id":"","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adobe/hypermedia-pipeline","description":null,"fork":false,"url":"https://api.github.com/repos/adobe/hypermedia-pipeline","forks_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/forks","keys_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/teams","hooks_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/hooks","issue_events_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/issues/events{/number}","events_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/events","assignees_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/assignees{/user}","branches_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/branches{/branch}","tags_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/tags","blobs_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/git/refs{/sha}","trees_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/statuses/{sha}","languages_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/languages","stargazers_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/stargazers","contributors_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/contributors","subscribers_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/subscribers","subscription_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/subscription","commits_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/commits{/sha}","git_commits_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/git/commits{/sha}","comments_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/comments{/number}","issue_comment_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/issues/comments{/number}","contents_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/contents/{+path}","compare_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/merges","archive_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/downloads","issues_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/issues{/number}","pulls_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/pulls{/number}","milestones_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/milestones{/number}","notifications_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/labels{/name}","releases_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/releases{/id}","deployments_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/deployments","created_at":"2018-06-28T09:38:29Z","updated_at":"2018-08-24T01:24:30Z","pushed_at":"2018-08-31T08:52:58Z","git_url":"git://github.com/adobe/hypermedia-pipeline.git","ssh_url":"git@github.com:adobe/hypermedia-pipeline.git","clone_url":"https://github.com/adobe/hypermedia-pipeline.git","svn_url":"https://github.com/adobe/hypermedia-pipeline","homepage":null,"size":325,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":15,"watchers":0,"default_branch":"master"}},"base":{"label":"adobe:master","ref":"master","sha":"3ab2fc38ff411e81d18388ea140b6cd792cb59d5","user":{"login":"adobe","id":476009,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NjAwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/476009?v=4","gravatar_id":"","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"repo":{"id":138998076,"node_id":"MDEwOlJlcG9zaXRvcnkxMzg5OTgwNzY=","name":"hypermedia-pipeline","full_name":"adobe/hypermedia-pipeline","owner":{"login":"adobe","id":476009,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ3NjAwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/476009?v=4","gravatar_id":"","url":"https://api.github.com/users/adobe","html_url":"https://github.com/adobe","followers_url":"https://api.github.com/users/adobe/followers","following_url":"https://api.github.com/users/adobe/following{/other_user}","gists_url":"https://api.github.com/users/adobe/gists{/gist_id}","starred_url":"https://api.github.com/users/adobe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/adobe/subscriptions","organizations_url":"https://api.github.com/users/adobe/orgs","repos_url":"https://api.github.com/users/adobe/repos","events_url":"https://api.github.com/users/adobe/events{/privacy}","received_events_url":"https://api.github.com/users/adobe/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/adobe/hypermedia-pipeline","description":null,"fork":false,"url":"https://api.github.com/repos/adobe/hypermedia-pipeline","forks_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/forks","keys_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/keys{/key_id}","collaborators_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/teams","hooks_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/hooks","issue_events_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/issues/events{/number}","events_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/events","assignees_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/assignees{/user}","branches_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/branches{/branch}","tags_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/tags","blobs_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/git/refs{/sha}","trees_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/git/trees{/sha}","statuses_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/statuses/{sha}","languages_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/languages","stargazers_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/stargazers","contributors_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/contributors","subscribers_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/subscribers","subscription_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/subscription","commits_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/commits{/sha}","git_commits_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/git/commits{/sha}","comments_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/comments{/number}","issue_comment_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/issues/comments{/number}","contents_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/contents/{+path}","compare_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/compare/{base}...{head}","merges_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/merges","archive_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/downloads","issues_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/issues{/number}","pulls_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/pulls{/number}","milestones_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/milestones{/number}","notifications_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/labels{/name}","releases_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/releases{/id}","deployments_url":"https://api.github.com/repos/adobe/hypermedia-pipeline/deployments","created_at":"2018-06-28T09:38:29Z","updated_at":"2018-08-24T01:24:30Z","pushed_at":"2018-08-31T08:52:58Z","git_url":"git://github.com/adobe/hypermedia-pipeline.git","ssh_url":"git@github.com:adobe/hypermedia-pipeline.git","clone_url":"https://github.com/adobe/hypermedia-pipeline.git","svn_url":"https://github.com/adobe/hypermedia-pipeline","homepage":null,"size":325,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":15,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/adobe/hypermedia-pipeline/pulls/35"},"html":{"href":"https://github.com/adobe/hypermedia-pipeline/pull/35"},"issue":{"href":"https://api.github.com/repos/adobe/hypermedia-pipeline/issues/35"},"comments":{"href":"https://api.github.com/repos/adobe/hypermedia-pipeline/issues/35/comments"},"review_comments":{"href":"https://api.github.com/repos/adobe/hypermedia-pipeline/pulls/35/comments"},"review_comment":{"href":"https://api.github.com/repos/adobe/hypermedia-pipeline/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/adobe/hypermedia-pipeline/pulls/35/commits"},"statuses":{"href":"https://api.github.com/repos/adobe/hypermedia-pipeline/statuses/eabca3bda08077020f627b14b02e6e08d8453f49"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"tripodsan"}}