{"action":"created","comment":{"url":"https://api.github.com/repos/learningequality/kolibri/pulls/comments/64079384","id":64079384,"diff_hunk":"@@ -0,0 +1,72 @@\n+#!/bin/bash\n+\n+# This script is invoked by Travis testing and inspects\n+# the changeset that's being built.\n+#\n+# Usage:\n+#\n+#    testif.sh <label> && something_else\n+#\n+# The intention is to be able to ONLY test certain aspects\n+# when special conditions are satisfied.\n+#\n+# Notes:\n+#    JS tests are expected to be very fast\n+#    We shouldn't skip tests when it affects Coverage negatively\n+#    We can possibly do tests based on which branch is pushed to\n+#\n+# https://github.com/learningequality/kolibri/issues/27\n+#\n+# What changes are analyzed?\n+#\n+# For this script, we should mainly use Travis' env\n+# $TRAVIS_COMMIT_RANGE. The reason is simple: You cannot tell what\n+# changes have been implemented since last test, thus if your\n+# condtion should fire or not.\n+#\n+# Definition:\n+# TRAVIS_COMMIT_RANGE: The range of commits that were included in\n+# the push or pull request.\n+#\n+# https://docs.travis-ci.com/user/environment-variables/\n+\n+\n+set -e\n+\n+LABEL=\"$1\"\n+\n+commit=\"$TRAVIS_COMMIT\"\n+commits=\"$TRAVIS_COMMIT_RANGE\"\n+git_changeset=`git show --name-only --no-notes --oneline $commits`\n+\n+\n+# If something changes that's related to our sdist packaging\n+# or installation mechanism, then we build and install.\n+if [[ \"$LABEL\" == \"setup_changed\" ]]\n+then\n+\n+    # Match with commit messages containing \"[ setup ]\"\n+    # Match commits changing requirements.txt\n+    # Match commits changing setup.py\n+    if echo \"$git_changeset\" | grep -q \"\\[\\s*setup\\s*\\]\" || \\\n+       echo \"$git_changeset\" | grep -q \"^setup\\.py\" || \\\n+       echo \"$git_changeset\" | grep -q \"^requirements\"","path":"testif.sh","position":53,"original_position":53,"commit_id":"beb6f128146c53c769aa3b06b3df1b473c091a36","original_commit_id":"beb6f128146c53c769aa3b06b3df1b473c091a36","user":{"login":"MCGallaspy","id":8888020,"avatar_url":"https://avatars.githubusercontent.com/u/8888020?v=3","gravatar_id":"","url":"https://api.github.com/users/MCGallaspy","html_url":"https://github.com/MCGallaspy","followers_url":"https://api.github.com/users/MCGallaspy/followers","following_url":"https://api.github.com/users/MCGallaspy/following{/other_user}","gists_url":"https://api.github.com/users/MCGallaspy/gists{/gist_id}","starred_url":"https://api.github.com/users/MCGallaspy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MCGallaspy/subscriptions","organizations_url":"https://api.github.com/users/MCGallaspy/orgs","repos_url":"https://api.github.com/users/MCGallaspy/repos","events_url":"https://api.github.com/users/MCGallaspy/events{/privacy}","received_events_url":"https://api.github.com/users/MCGallaspy/received_events","type":"User","site_admin":false},"body":"Looks like you forgot the `|| \\` for subsequent lines here.","created_at":"2016-05-20T17:41:31Z","updated_at":"2016-05-20T17:41:31Z","html_url":"https://github.com/learningequality/kolibri/pull/88#discussion_r64079384","pull_request_url":"https://api.github.com/repos/learningequality/kolibri/pulls/88","_links":{"self":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/comments/64079384"},"html":{"href":"https://github.com/learningequality/kolibri/pull/88#discussion_r64079384"},"pull_request":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/88"}}},"pull_request":{"url":"https://api.github.com/repos/learningequality/kolibri/pulls/88","id":70560264,"html_url":"https://github.com/learningequality/kolibri/pull/88","diff_url":"https://github.com/learningequality/kolibri/pull/88.diff","patch_url":"https://github.com/learningequality/kolibri/pull/88.patch","issue_url":"https://api.github.com/repos/learningequality/kolibri/issues/88","number":88,"state":"open","locked":false,"title":"Conditional testing of sdist building and installation","user":{"login":"benjaoming","id":374612,"avatar_url":"https://avatars.githubusercontent.com/u/374612?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaoming","html_url":"https://github.com/benjaoming","followers_url":"https://api.github.com/users/benjaoming/followers","following_url":"https://api.github.com/users/benjaoming/following{/other_user}","gists_url":"https://api.github.com/users/benjaoming/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaoming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaoming/subscriptions","organizations_url":"https://api.github.com/users/benjaoming/orgs","repos_url":"https://api.github.com/users/benjaoming/repos","events_url":"https://api.github.com/users/benjaoming/events{/privacy}","received_events_url":"https://api.github.com/users/benjaoming/received_events","type":"User","site_admin":false},"body":"## Summary\r\n\r\nAdds automated testing of building and installing the dists only when it's necessary or manually requested.\r\n\r\n * If `requirements*` are in the changeset\r\n * If `setup.py` is in the changeset\r\n * If `Makefile` is in the changeset\r\n * If `MANIFEST.in` is in the changeset\r\n * if `[ setup ]` is in the commit message\r\n\r\n## Reviewer guidance\r\n\r\nMake note that the intention of this PR is to have something tested **that would otherwise not be tested**. It is not to skip essential testing.\r\n\r\nAs a strategic means, we can perhaps use/improve this practice for other purposes if we run into similar scenarios.\r\n\r\n## Issues addressed\r\n\r\n#27 \r\n\r\n## Documentation\r\n\r\nAdded as comments in testif.sh\r\n","created_at":"2016-05-18T16:33:43Z","updated_at":"2016-05-20T17:41:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c3cbc423eb6ab32b7f72f3cfaa3e8a8e5624f20","assignee":{"login":"MCGallaspy","id":8888020,"avatar_url":"https://avatars.githubusercontent.com/u/8888020?v=3","gravatar_id":"","url":"https://api.github.com/users/MCGallaspy","html_url":"https://github.com/MCGallaspy","followers_url":"https://api.github.com/users/MCGallaspy/followers","following_url":"https://api.github.com/users/MCGallaspy/following{/other_user}","gists_url":"https://api.github.com/users/MCGallaspy/gists{/gist_id}","starred_url":"https://api.github.com/users/MCGallaspy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MCGallaspy/subscriptions","organizations_url":"https://api.github.com/users/MCGallaspy/orgs","repos_url":"https://api.github.com/users/MCGallaspy/repos","events_url":"https://api.github.com/users/MCGallaspy/events{/privacy}","received_events_url":"https://api.github.com/users/MCGallaspy/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/learningequality/kolibri/pulls/88/commits","review_comments_url":"https://api.github.com/repos/learningequality/kolibri/pulls/88/comments","review_comment_url":"https://api.github.com/repos/learningequality/kolibri/pulls/comments{/number}","comments_url":"https://api.github.com/repos/learningequality/kolibri/issues/88/comments","statuses_url":"https://api.github.com/repos/learningequality/kolibri/statuses/beb6f128146c53c769aa3b06b3df1b473c091a36","head":{"label":"benjaoming:sdist-with-static-deps","ref":"sdist-with-static-deps","sha":"beb6f128146c53c769aa3b06b3df1b473c091a36","user":{"login":"benjaoming","id":374612,"avatar_url":"https://avatars.githubusercontent.com/u/374612?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaoming","html_url":"https://github.com/benjaoming","followers_url":"https://api.github.com/users/benjaoming/followers","following_url":"https://api.github.com/users/benjaoming/following{/other_user}","gists_url":"https://api.github.com/users/benjaoming/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaoming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaoming/subscriptions","organizations_url":"https://api.github.com/users/benjaoming/orgs","repos_url":"https://api.github.com/users/benjaoming/repos","events_url":"https://api.github.com/users/benjaoming/events{/privacy}","received_events_url":"https://api.github.com/users/benjaoming/received_events","type":"User","site_admin":false},"repo":{"id":50074781,"name":"kolibri","full_name":"benjaoming/kolibri","owner":{"login":"benjaoming","id":374612,"avatar_url":"https://avatars.githubusercontent.com/u/374612?v=3","gravatar_id":"","url":"https://api.github.com/users/benjaoming","html_url":"https://github.com/benjaoming","followers_url":"https://api.github.com/users/benjaoming/followers","following_url":"https://api.github.com/users/benjaoming/following{/other_user}","gists_url":"https://api.github.com/users/benjaoming/gists{/gist_id}","starred_url":"https://api.github.com/users/benjaoming/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/benjaoming/subscriptions","organizations_url":"https://api.github.com/users/benjaoming/orgs","repos_url":"https://api.github.com/users/benjaoming/repos","events_url":"https://api.github.com/users/benjaoming/events{/privacy}","received_events_url":"https://api.github.com/users/benjaoming/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/benjaoming/kolibri","description":"This is where Kolibri shall be born, watch and participate!","fork":true,"url":"https://api.github.com/repos/benjaoming/kolibri","forks_url":"https://api.github.com/repos/benjaoming/kolibri/forks","keys_url":"https://api.github.com/repos/benjaoming/kolibri/keys{/key_id}","collaborators_url":"https://api.github.com/repos/benjaoming/kolibri/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/benjaoming/kolibri/teams","hooks_url":"https://api.github.com/repos/benjaoming/kolibri/hooks","issue_events_url":"https://api.github.com/repos/benjaoming/kolibri/issues/events{/number}","events_url":"https://api.github.com/repos/benjaoming/kolibri/events","assignees_url":"https://api.github.com/repos/benjaoming/kolibri/assignees{/user}","branches_url":"https://api.github.com/repos/benjaoming/kolibri/branches{/branch}","tags_url":"https://api.github.com/repos/benjaoming/kolibri/tags","blobs_url":"https://api.github.com/repos/benjaoming/kolibri/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/benjaoming/kolibri/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/benjaoming/kolibri/git/refs{/sha}","trees_url":"https://api.github.com/repos/benjaoming/kolibri/git/trees{/sha}","statuses_url":"https://api.github.com/repos/benjaoming/kolibri/statuses/{sha}","languages_url":"https://api.github.com/repos/benjaoming/kolibri/languages","stargazers_url":"https://api.github.com/repos/benjaoming/kolibri/stargazers","contributors_url":"https://api.github.com/repos/benjaoming/kolibri/contributors","subscribers_url":"https://api.github.com/repos/benjaoming/kolibri/subscribers","subscription_url":"https://api.github.com/repos/benjaoming/kolibri/subscription","commits_url":"https://api.github.com/repos/benjaoming/kolibri/commits{/sha}","git_commits_url":"https://api.github.com/repos/benjaoming/kolibri/git/commits{/sha}","comments_url":"https://api.github.com/repos/benjaoming/kolibri/comments{/number}","issue_comment_url":"https://api.github.com/repos/benjaoming/kolibri/issues/comments{/number}","contents_url":"https://api.github.com/repos/benjaoming/kolibri/contents/{+path}","compare_url":"https://api.github.com/repos/benjaoming/kolibri/compare/{base}...{head}","merges_url":"https://api.github.com/repos/benjaoming/kolibri/merges","archive_url":"https://api.github.com/repos/benjaoming/kolibri/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/benjaoming/kolibri/downloads","issues_url":"https://api.github.com/repos/benjaoming/kolibri/issues{/number}","pulls_url":"https://api.github.com/repos/benjaoming/kolibri/pulls{/number}","milestones_url":"https://api.github.com/repos/benjaoming/kolibri/milestones{/number}","notifications_url":"https://api.github.com/repos/benjaoming/kolibri/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/benjaoming/kolibri/labels{/name}","releases_url":"https://api.github.com/repos/benjaoming/kolibri/releases{/id}","deployments_url":"https://api.github.com/repos/benjaoming/kolibri/deployments","created_at":"2016-01-21T02:03:13Z","updated_at":"2016-01-21T14:31:46Z","pushed_at":"2016-05-20T14:48:34Z","git_url":"git://github.com/benjaoming/kolibri.git","ssh_url":"git@github.com:benjaoming/kolibri.git","clone_url":"https://github.com/benjaoming/kolibri.git","svn_url":"https://github.com/benjaoming/kolibri","homepage":"http://learningequality.org/kolibri/","size":4895,"stargazers_count":0,"watchers_count":0,"language":"Python","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":"learningequality:master","ref":"master","sha":"dbabad2743958558838cda01131e72802f9a27b7","user":{"login":"learningequality","id":3926525,"avatar_url":"https://avatars.githubusercontent.com/u/3926525?v=3","gravatar_id":"","url":"https://api.github.com/users/learningequality","html_url":"https://github.com/learningequality","followers_url":"https://api.github.com/users/learningequality/followers","following_url":"https://api.github.com/users/learningequality/following{/other_user}","gists_url":"https://api.github.com/users/learningequality/gists{/gist_id}","starred_url":"https://api.github.com/users/learningequality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learningequality/subscriptions","organizations_url":"https://api.github.com/users/learningequality/orgs","repos_url":"https://api.github.com/users/learningequality/repos","events_url":"https://api.github.com/users/learningequality/events{/privacy}","received_events_url":"https://api.github.com/users/learningequality/received_events","type":"Organization","site_admin":false},"repo":{"id":49976939,"name":"kolibri","full_name":"learningequality/kolibri","owner":{"login":"learningequality","id":3926525,"avatar_url":"https://avatars.githubusercontent.com/u/3926525?v=3","gravatar_id":"","url":"https://api.github.com/users/learningequality","html_url":"https://github.com/learningequality","followers_url":"https://api.github.com/users/learningequality/followers","following_url":"https://api.github.com/users/learningequality/following{/other_user}","gists_url":"https://api.github.com/users/learningequality/gists{/gist_id}","starred_url":"https://api.github.com/users/learningequality/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learningequality/subscriptions","organizations_url":"https://api.github.com/users/learningequality/orgs","repos_url":"https://api.github.com/users/learningequality/repos","events_url":"https://api.github.com/users/learningequality/events{/privacy}","received_events_url":"https://api.github.com/users/learningequality/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/learningequality/kolibri","description":"This is where Kolibri shall be born, watch and participate!","fork":false,"url":"https://api.github.com/repos/learningequality/kolibri","forks_url":"https://api.github.com/repos/learningequality/kolibri/forks","keys_url":"https://api.github.com/repos/learningequality/kolibri/keys{/key_id}","collaborators_url":"https://api.github.com/repos/learningequality/kolibri/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/learningequality/kolibri/teams","hooks_url":"https://api.github.com/repos/learningequality/kolibri/hooks","issue_events_url":"https://api.github.com/repos/learningequality/kolibri/issues/events{/number}","events_url":"https://api.github.com/repos/learningequality/kolibri/events","assignees_url":"https://api.github.com/repos/learningequality/kolibri/assignees{/user}","branches_url":"https://api.github.com/repos/learningequality/kolibri/branches{/branch}","tags_url":"https://api.github.com/repos/learningequality/kolibri/tags","blobs_url":"https://api.github.com/repos/learningequality/kolibri/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/learningequality/kolibri/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/learningequality/kolibri/git/refs{/sha}","trees_url":"https://api.github.com/repos/learningequality/kolibri/git/trees{/sha}","statuses_url":"https://api.github.com/repos/learningequality/kolibri/statuses/{sha}","languages_url":"https://api.github.com/repos/learningequality/kolibri/languages","stargazers_url":"https://api.github.com/repos/learningequality/kolibri/stargazers","contributors_url":"https://api.github.com/repos/learningequality/kolibri/contributors","subscribers_url":"https://api.github.com/repos/learningequality/kolibri/subscribers","subscription_url":"https://api.github.com/repos/learningequality/kolibri/subscription","commits_url":"https://api.github.com/repos/learningequality/kolibri/commits{/sha}","git_commits_url":"https://api.github.com/repos/learningequality/kolibri/git/commits{/sha}","comments_url":"https://api.github.com/repos/learningequality/kolibri/comments{/number}","issue_comment_url":"https://api.github.com/repos/learningequality/kolibri/issues/comments{/number}","contents_url":"https://api.github.com/repos/learningequality/kolibri/contents/{+path}","compare_url":"https://api.github.com/repos/learningequality/kolibri/compare/{base}...{head}","merges_url":"https://api.github.com/repos/learningequality/kolibri/merges","archive_url":"https://api.github.com/repos/learningequality/kolibri/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/learningequality/kolibri/downloads","issues_url":"https://api.github.com/repos/learningequality/kolibri/issues{/number}","pulls_url":"https://api.github.com/repos/learningequality/kolibri/pulls{/number}","milestones_url":"https://api.github.com/repos/learningequality/kolibri/milestones{/number}","notifications_url":"https://api.github.com/repos/learningequality/kolibri/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/learningequality/kolibri/labels{/name}","releases_url":"https://api.github.com/repos/learningequality/kolibri/releases{/id}","deployments_url":"https://api.github.com/repos/learningequality/kolibri/deployments","created_at":"2016-01-19T19:22:07Z","updated_at":"2016-04-13T06:45:10Z","pushed_at":"2016-05-20T15:09:13Z","git_url":"git://github.com/learningequality/kolibri.git","ssh_url":"git@github.com:learningequality/kolibri.git","clone_url":"https://github.com/learningequality/kolibri.git","svn_url":"https://github.com/learningequality/kolibri","homepage":"http://learningequality.org/kolibri/","size":5212,"stargazers_count":17,"watchers_count":17,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":20,"mirror_url":null,"open_issues_count":26,"forks":20,"open_issues":26,"watchers":17,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/88"},"html":{"href":"https://github.com/learningequality/kolibri/pull/88"},"issue":{"href":"https://api.github.com/repos/learningequality/kolibri/issues/88"},"comments":{"href":"https://api.github.com/repos/learningequality/kolibri/issues/88/comments"},"review_comments":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/88/comments"},"review_comment":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/learningequality/kolibri/pulls/88/commits"},"statuses":{"href":"https://api.github.com/repos/learningequality/kolibri/statuses/beb6f128146c53c769aa3b06b3df1b473c091a36"}}}}
{"actor":{"display_login":"MCGallaspy"}}