{"action":"created","comment":{"url":"https://api.github.com/repos/google/ggrc-core/pulls/comments/166930608","pull_request_review_id":95068884,"id":166930608,"diff_hunk":"@@ -0,0 +1,41 @@\n+# Copyright (C) 2018 Google Inc.\n+# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>\n+\n+\"\"\"A stub for Issue Tracker urlfetch\n+Setup is done in ggrc/app.py","path":"src/ggrc/utils/issue_tracker_mock/__init__.py","position":5,"original_position":5,"commit_id":"279aef920c8946ea178ea61ce405b8760a3294d6","original_commit_id":"279aef920c8946ea178ea61ce405b8760a3294d6","user":{"login":"zidarsk8","id":566311,"avatar_url":"https://avatars2.githubusercontent.com/u/566311?v=4","gravatar_id":"","url":"https://api.github.com/users/zidarsk8","html_url":"https://github.com/zidarsk8","followers_url":"https://api.github.com/users/zidarsk8/followers","following_url":"https://api.github.com/users/zidarsk8/following{/other_user}","gists_url":"https://api.github.com/users/zidarsk8/gists{/gist_id}","starred_url":"https://api.github.com/users/zidarsk8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zidarsk8/subscriptions","organizations_url":"https://api.github.com/users/zidarsk8/orgs","repos_url":"https://api.github.com/users/zidarsk8/repos","events_url":"https://api.github.com/users/zidarsk8/events{/privacy}","received_events_url":"https://api.github.com/users/zidarsk8/received_events","type":"User","site_admin":false},"body":"Totally minor thing and can be ignored, but docstrings should have an empty line after the title line.\r\n\r\nsee https://google.github.io/styleguide/pyguide.html#Comments","created_at":"2018-02-08T13:21:30Z","updated_at":"2018-02-08T13:21:30Z","html_url":"https://github.com/google/ggrc-core/pull/7298#discussion_r166930608","pull_request_url":"https://api.github.com/repos/google/ggrc-core/pulls/7298","author_association":"COLLABORATOR","_links":{"self":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/comments/166930608"},"html":{"href":"https://github.com/google/ggrc-core/pull/7298#discussion_r166930608"},"pull_request":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/7298"}}},"pull_request":{"url":"https://api.github.com/repos/google/ggrc-core/pulls/7298","id":167963861,"html_url":"https://github.com/google/ggrc-core/pull/7298","diff_url":"https://github.com/google/ggrc-core/pull/7298.diff","patch_url":"https://github.com/google/ggrc-core/pull/7298.patch","issue_url":"https://api.github.com/repos/google/ggrc-core/issues/7298","number":7298,"state":"open","locked":false,"title":"QUICK-FIX Add issue tracker mock","user":{"login":"neocoder","id":85838,"avatar_url":"https://avatars2.githubusercontent.com/u/85838?v=4","gravatar_id":"","url":"https://api.github.com/users/neocoder","html_url":"https://github.com/neocoder","followers_url":"https://api.github.com/users/neocoder/followers","following_url":"https://api.github.com/users/neocoder/following{/other_user}","gists_url":"https://api.github.com/users/neocoder/gists{/gist_id}","starred_url":"https://api.github.com/users/neocoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neocoder/subscriptions","organizations_url":"https://api.github.com/users/neocoder/orgs","repos_url":"https://api.github.com/users/neocoder/repos","events_url":"https://api.github.com/users/neocoder/events{/privacy}","received_events_url":"https://api.github.com/users/neocoder/received_events","type":"User","site_admin":false},"body":"⚠️ __BE PR from the FE guy, please be gentle__ 🙂\r\n\r\n# Issue description\r\n\r\nAt the moment there's no way to fully test Issue Tracker integration on local dev environment.\r\n\r\n# Steps to test the changes\r\n\r\n1. Make you `docker-compose.override.yml` look similar to this\r\n```yaml\r\nversion: '2'\r\nservices:\r\n  cleandev:\r\n    environment:\r\n     <...YOUR CURRENT VARIABLES...>\r\n     - ISSUE_TRACKER_ENABLED=true\r\n     - ISSUE_TRACKER_MOCK=true    \r\n```\r\n2. Rebuild container with `./bin/containers run` ( this will just rebuild container from cached images applying new env variables. It takes few seconds )\r\n3. Go to any Audit and enable Issue Tracker integration\r\n4. Create assessment\r\n5. Open Assessment info pane of the newly created assessment and Check the url of the \"Ticket\" link at the top of the Assessment tab. it should be \"http://issue/1234\"\r\n\r\n# Solution description\r\n\r\nSince Issue Tracker integration uses `urlfetch` API to perform requests to the integration server, we can mock these request with the `apiproxy_stub` API from the `google.appengine.api`.\r\nThe solution is based on this gist: \"https://gist.github.com/kesor/1179782\"\r\n\r\n# Sanity checklist\r\n\r\n- [x] I have clicked through the app to make sure my changes work and not break the app.\r\n- [x] I have applied the correct milestone and labels.\r\n- [x] My changes fix the issue described in the description (and do nothing else). 🤞\r\n- [ ] __N/A__ ~~My changes are covered by tests.~~\r\n- [x] My changes follow our [performance guidelines](https://github.com/google/ggrc-core/blob/dev/docs/source/contributing/performance.rst).\r\n- [x] My changes follow our [js](https://github.com/google/ggrc-core/blob/dev/docs/source/contributing/javascript.rst) and/or [python](https://github.com/google/ggrc-core/blob/dev/docs/source/contributing/python.rst) guidelines.\r\n- [x] My commits follow our [commit guidelines](https://github.com/google/ggrc-core/blob/dev/docs/source/contributing/git/how_to_write_a_commit_message.rst).\r\n\r\n# PR Review checklist\r\n\r\n- [ ] The changes fix the issue and don't cause any apparent regressions.\r\n- [ ] Labels and milestone are correctly set.\r\n- [ ] The solution description matches the changes in the code.\r\n- [ ] There is no apparent way to improve the performance & design of the new code.\r\n- [ ] The pull request is opened against the correct base branch.\r\n- [ ] Upon merging, the Jira ticket's fixversion is correctly set and the ticket is moved to \"QA - In Progress\".\r\n\r\n# TODO\r\n\r\n- [ ] Add Docs\r\n","created_at":"2018-02-08T12:54:33Z","updated_at":"2018-02-08T13:21:30Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f77f940f122ff9381c0a80e1f5666e644ec34e71","assignee":{"login":"alieh-rymasheuski","id":9883236,"avatar_url":"https://avatars2.githubusercontent.com/u/9883236?v=4","gravatar_id":"","url":"https://api.github.com/users/alieh-rymasheuski","html_url":"https://github.com/alieh-rymasheuski","followers_url":"https://api.github.com/users/alieh-rymasheuski/followers","following_url":"https://api.github.com/users/alieh-rymasheuski/following{/other_user}","gists_url":"https://api.github.com/users/alieh-rymasheuski/gists{/gist_id}","starred_url":"https://api.github.com/users/alieh-rymasheuski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alieh-rymasheuski/subscriptions","organizations_url":"https://api.github.com/users/alieh-rymasheuski/orgs","repos_url":"https://api.github.com/users/alieh-rymasheuski/repos","events_url":"https://api.github.com/users/alieh-rymasheuski/events{/privacy}","received_events_url":"https://api.github.com/users/alieh-rymasheuski/received_events","type":"User","site_admin":false},"assignees":[{"login":"alieh-rymasheuski","id":9883236,"avatar_url":"https://avatars2.githubusercontent.com/u/9883236?v=4","gravatar_id":"","url":"https://api.github.com/users/alieh-rymasheuski","html_url":"https://github.com/alieh-rymasheuski","followers_url":"https://api.github.com/users/alieh-rymasheuski/followers","following_url":"https://api.github.com/users/alieh-rymasheuski/following{/other_user}","gists_url":"https://api.github.com/users/alieh-rymasheuski/gists{/gist_id}","starred_url":"https://api.github.com/users/alieh-rymasheuski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alieh-rymasheuski/subscriptions","organizations_url":"https://api.github.com/users/alieh-rymasheuski/orgs","repos_url":"https://api.github.com/users/alieh-rymasheuski/repos","events_url":"https://api.github.com/users/alieh-rymasheuski/events{/privacy}","received_events_url":"https://api.github.com/users/alieh-rymasheuski/received_events","type":"User","site_admin":false}],"requested_reviewers":[],"requested_teams":[],"milestone":{"url":"https://api.github.com/repos/google/ggrc-core/milestones/76","html_url":"https://github.com/google/ggrc-core/milestone/76","labels_url":"https://api.github.com/repos/google/ggrc-core/milestones/76/labels","id":3063404,"number":76,"title":"1.4.0-Strawberry","description":"","creator":{"login":"zidarsk8","id":566311,"avatar_url":"https://avatars2.githubusercontent.com/u/566311?v=4","gravatar_id":"","url":"https://api.github.com/users/zidarsk8","html_url":"https://github.com/zidarsk8","followers_url":"https://api.github.com/users/zidarsk8/followers","following_url":"https://api.github.com/users/zidarsk8/following{/other_user}","gists_url":"https://api.github.com/users/zidarsk8/gists{/gist_id}","starred_url":"https://api.github.com/users/zidarsk8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zidarsk8/subscriptions","organizations_url":"https://api.github.com/users/zidarsk8/orgs","repos_url":"https://api.github.com/users/zidarsk8/repos","events_url":"https://api.github.com/users/zidarsk8/events{/privacy}","received_events_url":"https://api.github.com/users/zidarsk8/received_events","type":"User","site_admin":false},"open_issues":38,"closed_issues":45,"state":"open","created_at":"2018-01-25T09:49:12Z","updated_at":"2018-02-08T12:54:33Z","due_on":"2018-02-20T08:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/google/ggrc-core/pulls/7298/commits","review_comments_url":"https://api.github.com/repos/google/ggrc-core/pulls/7298/comments","review_comment_url":"https://api.github.com/repos/google/ggrc-core/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/ggrc-core/issues/7298/comments","statuses_url":"https://api.github.com/repos/google/ggrc-core/statuses/279aef920c8946ea178ea61ce405b8760a3294d6","head":{"label":"neocoder:QF-ISSUE-TRACKER-MOCK","ref":"QF-ISSUE-TRACKER-MOCK","sha":"279aef920c8946ea178ea61ce405b8760a3294d6","user":{"login":"neocoder","id":85838,"avatar_url":"https://avatars2.githubusercontent.com/u/85838?v=4","gravatar_id":"","url":"https://api.github.com/users/neocoder","html_url":"https://github.com/neocoder","followers_url":"https://api.github.com/users/neocoder/followers","following_url":"https://api.github.com/users/neocoder/following{/other_user}","gists_url":"https://api.github.com/users/neocoder/gists{/gist_id}","starred_url":"https://api.github.com/users/neocoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neocoder/subscriptions","organizations_url":"https://api.github.com/users/neocoder/orgs","repos_url":"https://api.github.com/users/neocoder/repos","events_url":"https://api.github.com/users/neocoder/events{/privacy}","received_events_url":"https://api.github.com/users/neocoder/received_events","type":"User","site_admin":false},"repo":{"id":99124011,"name":"ggrc-core","full_name":"neocoder/ggrc-core","owner":{"login":"neocoder","id":85838,"avatar_url":"https://avatars2.githubusercontent.com/u/85838?v=4","gravatar_id":"","url":"https://api.github.com/users/neocoder","html_url":"https://github.com/neocoder","followers_url":"https://api.github.com/users/neocoder/followers","following_url":"https://api.github.com/users/neocoder/following{/other_user}","gists_url":"https://api.github.com/users/neocoder/gists{/gist_id}","starred_url":"https://api.github.com/users/neocoder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neocoder/subscriptions","organizations_url":"https://api.github.com/users/neocoder/orgs","repos_url":"https://api.github.com/users/neocoder/repos","events_url":"https://api.github.com/users/neocoder/events{/privacy}","received_events_url":"https://api.github.com/users/neocoder/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/neocoder/ggrc-core","description":"GGRC Core","fork":true,"url":"https://api.github.com/repos/neocoder/ggrc-core","forks_url":"https://api.github.com/repos/neocoder/ggrc-core/forks","keys_url":"https://api.github.com/repos/neocoder/ggrc-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/neocoder/ggrc-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/neocoder/ggrc-core/teams","hooks_url":"https://api.github.com/repos/neocoder/ggrc-core/hooks","issue_events_url":"https://api.github.com/repos/neocoder/ggrc-core/issues/events{/number}","events_url":"https://api.github.com/repos/neocoder/ggrc-core/events","assignees_url":"https://api.github.com/repos/neocoder/ggrc-core/assignees{/user}","branches_url":"https://api.github.com/repos/neocoder/ggrc-core/branches{/branch}","tags_url":"https://api.github.com/repos/neocoder/ggrc-core/tags","blobs_url":"https://api.github.com/repos/neocoder/ggrc-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/neocoder/ggrc-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/neocoder/ggrc-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/neocoder/ggrc-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/neocoder/ggrc-core/statuses/{sha}","languages_url":"https://api.github.com/repos/neocoder/ggrc-core/languages","stargazers_url":"https://api.github.com/repos/neocoder/ggrc-core/stargazers","contributors_url":"https://api.github.com/repos/neocoder/ggrc-core/contributors","subscribers_url":"https://api.github.com/repos/neocoder/ggrc-core/subscribers","subscription_url":"https://api.github.com/repos/neocoder/ggrc-core/subscription","commits_url":"https://api.github.com/repos/neocoder/ggrc-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/neocoder/ggrc-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/neocoder/ggrc-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/neocoder/ggrc-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/neocoder/ggrc-core/contents/{+path}","compare_url":"https://api.github.com/repos/neocoder/ggrc-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/neocoder/ggrc-core/merges","archive_url":"https://api.github.com/repos/neocoder/ggrc-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/neocoder/ggrc-core/downloads","issues_url":"https://api.github.com/repos/neocoder/ggrc-core/issues{/number}","pulls_url":"https://api.github.com/repos/neocoder/ggrc-core/pulls{/number}","milestones_url":"https://api.github.com/repos/neocoder/ggrc-core/milestones{/number}","notifications_url":"https://api.github.com/repos/neocoder/ggrc-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/neocoder/ggrc-core/labels{/name}","releases_url":"https://api.github.com/repos/neocoder/ggrc-core/releases{/id}","deployments_url":"https://api.github.com/repos/neocoder/ggrc-core/deployments","created_at":"2017-08-02T14:13:15Z","updated_at":"2017-08-02T14:13:22Z","pushed_at":"2018-02-08T13:14:35Z","git_url":"git://github.com/neocoder/ggrc-core.git","ssh_url":"git@github.com:neocoder/ggrc-core.git","clone_url":"https://github.com/neocoder/ggrc-core.git","svn_url":"https://github.com/neocoder/ggrc-core","homepage":null,"size":71823,"stargazers_count":0,"watchers_count":0,"language":"Python","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":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"dev"}},"base":{"label":"google:dev","ref":"dev","sha":"393ff5ff1b022b66071224e6f356a729811e3718","user":{"login":"google","id":1342004,"avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":9304637,"name":"ggrc-core","full_name":"google/ggrc-core","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars1.githubusercontent.com/u/1342004?v=4","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/ggrc-core","description":"GGRC Core","fork":false,"url":"https://api.github.com/repos/google/ggrc-core","forks_url":"https://api.github.com/repos/google/ggrc-core/forks","keys_url":"https://api.github.com/repos/google/ggrc-core/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/ggrc-core/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/ggrc-core/teams","hooks_url":"https://api.github.com/repos/google/ggrc-core/hooks","issue_events_url":"https://api.github.com/repos/google/ggrc-core/issues/events{/number}","events_url":"https://api.github.com/repos/google/ggrc-core/events","assignees_url":"https://api.github.com/repos/google/ggrc-core/assignees{/user}","branches_url":"https://api.github.com/repos/google/ggrc-core/branches{/branch}","tags_url":"https://api.github.com/repos/google/ggrc-core/tags","blobs_url":"https://api.github.com/repos/google/ggrc-core/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/ggrc-core/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/ggrc-core/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/ggrc-core/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/ggrc-core/statuses/{sha}","languages_url":"https://api.github.com/repos/google/ggrc-core/languages","stargazers_url":"https://api.github.com/repos/google/ggrc-core/stargazers","contributors_url":"https://api.github.com/repos/google/ggrc-core/contributors","subscribers_url":"https://api.github.com/repos/google/ggrc-core/subscribers","subscription_url":"https://api.github.com/repos/google/ggrc-core/subscription","commits_url":"https://api.github.com/repos/google/ggrc-core/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/ggrc-core/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/ggrc-core/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/ggrc-core/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/ggrc-core/contents/{+path}","compare_url":"https://api.github.com/repos/google/ggrc-core/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/ggrc-core/merges","archive_url":"https://api.github.com/repos/google/ggrc-core/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/ggrc-core/downloads","issues_url":"https://api.github.com/repos/google/ggrc-core/issues{/number}","pulls_url":"https://api.github.com/repos/google/ggrc-core/pulls{/number}","milestones_url":"https://api.github.com/repos/google/ggrc-core/milestones{/number}","notifications_url":"https://api.github.com/repos/google/ggrc-core/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/ggrc-core/labels{/name}","releases_url":"https://api.github.com/repos/google/ggrc-core/releases{/id}","deployments_url":"https://api.github.com/repos/google/ggrc-core/deployments","created_at":"2013-04-08T19:16:28Z","updated_at":"2018-02-07T09:21:55Z","pushed_at":"2018-02-08T13:14:37Z","git_url":"git://github.com/google/ggrc-core.git","ssh_url":"git@github.com:google/ggrc-core.git","clone_url":"https://github.com/google/ggrc-core.git","svn_url":"https://github.com/google/ggrc-core","homepage":null,"size":74190,"stargazers_count":257,"watchers_count":257,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":186,"mirror_url":null,"archived":false,"open_issues_count":47,"license":null,"forks":186,"open_issues":47,"watchers":257,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/7298"},"html":{"href":"https://github.com/google/ggrc-core/pull/7298"},"issue":{"href":"https://api.github.com/repos/google/ggrc-core/issues/7298"},"comments":{"href":"https://api.github.com/repos/google/ggrc-core/issues/7298/comments"},"review_comments":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/7298/comments"},"review_comment":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/ggrc-core/pulls/7298/commits"},"statuses":{"href":"https://api.github.com/repos/google/ggrc-core/statuses/279aef920c8946ea178ea61ce405b8760a3294d6"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"zidarsk8"}}