{"action":"created","comment":{"url":"https://api.github.com/repos/zestsoftware/zest.releaser/pulls/comments/43093414","id":43093414,"diff_hunk":"@@ -145,17 +151,52 @@ def _grab_history(self):\n         if len(headings) > 1:\n             end = headings[1]['line']\n         else:\n-            end = -1\n-        for line in history_lines[start:end]:\n-            if self.data['nothing_changed_yet'] in line:\n+            end = len(history_lines)\n+        history_last_release = '\\n'.join(history_lines[start:end])\n+        self.data['history_last_release'] = history_last_release\n+        if self.data['nothing_changed_yet'] in history_last_release:\n+            # We want quotes around the text, but also want to avoid printing\n+            # text with a u'unicode marker' in front...\n+            pretty_nothing_changed = '\"{}\"'.format(\n+                self.data['nothing_changed_yet'])\n+            if not utils.ask(\n+                    \"WARNING: Changelog contains {}. Are you sure you \"\n+                    \"want to release?\".format(pretty_nothing_changed),\n+                    default=False):\n+                logger.info(\"You can use the 'lasttaglog' command to \"\n+                            \"see the commits since the last tag.\")\n+                sys.exit(1)\n+\n+        # Look for required text under the latest header.  This can be a list,\n+        # in which case only one item needs to be there.\n+        required = self.data.get('required_changelog_text')\n+        if required:\n+            if isinstance(required, six.string_types):\n+                required = [required]\n+            found = False\n+            for text in required:\n+                if text in history_last_release:\n+                    found = True\n+                    break\n+            if not found:\n+                pretty_required = '\"{}\"'.format('\", \"'.join(required))\n                 if not utils.ask(\n-                        \"WARNING: Changelog contains %r. Are you sure you \"\n-                        \"want to release?\" % self.data['nothing_changed_yet'],\n+                        \"WARNING: Changelog should contain at least one of \"\n+                        \"these required texts: {}. Are you sure you \"","path":"zest/releaser/prerelease.py","position":76,"original_position":76,"commit_id":"a58de107865ec28599cdd31d4fb48f07d670ddbe","original_commit_id":"a58de107865ec28599cdd31d4fb48f07d670ddbe","user":{"login":"reinout","id":121433,"avatar_url":"https://avatars.githubusercontent.com/u/121433?v=3","gravatar_id":"","url":"https://api.github.com/users/reinout","html_url":"https://github.com/reinout","followers_url":"https://api.github.com/users/reinout/followers","following_url":"https://api.github.com/users/reinout/following{/other_user}","gists_url":"https://api.github.com/users/reinout/gists{/gist_id}","starred_url":"https://api.github.com/users/reinout/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/reinout/subscriptions","organizations_url":"https://api.github.com/users/reinout/orgs","repos_url":"https://api.github.com/users/reinout/repos","events_url":"https://api.github.com/users/reinout/events{/privacy}","received_events_url":"https://api.github.com/users/reinout/received_events","type":"User","site_admin":false},"body":"texts => strings?","created_at":"2015-10-27T08:24:34Z","updated_at":"2015-10-27T08:24:34Z","html_url":"https://github.com/zestsoftware/zest.releaser/pull/139#discussion_r43093414","pull_request_url":"https://api.github.com/repos/zestsoftware/zest.releaser/pulls/139","_links":{"self":{"href":"https://api.github.com/repos/zestsoftware/zest.releaser/pulls/comments/43093414"},"html":{"href":"https://github.com/zestsoftware/zest.releaser/pull/139#discussion_r43093414"},"pull_request":{"href":"https://api.github.com/repos/zestsoftware/zest.releaser/pulls/139"}}},"pull_request":{"url":"https://api.github.com/repos/zestsoftware/zest.releaser/pulls/139","id":48820346,"html_url":"https://github.com/zestsoftware/zest.releaser/pull/139","diff_url":"https://github.com/zestsoftware/zest.releaser/pull/139.diff","patch_url":"https://github.com/zestsoftware/zest.releaser/pull/139.patch","issue_url":"https://api.github.com/repos/zestsoftware/zest.releaser/issues/139","number":139,"state":"open","locked":false,"title":"Check history","user":{"login":"mauritsvanrees","id":210587,"avatar_url":"https://avatars.githubusercontent.com/u/210587?v=3","gravatar_id":"","url":"https://api.github.com/users/mauritsvanrees","html_url":"https://github.com/mauritsvanrees","followers_url":"https://api.github.com/users/mauritsvanrees/followers","following_url":"https://api.github.com/users/mauritsvanrees/following{/other_user}","gists_url":"https://api.github.com/users/mauritsvanrees/gists{/gist_id}","starred_url":"https://api.github.com/users/mauritsvanrees/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauritsvanrees/subscriptions","organizations_url":"https://api.github.com/users/mauritsvanrees/orgs","repos_url":"https://api.github.com/users/mauritsvanrees/repos","events_url":"https://api.github.com/users/mauritsvanrees/events{/privacy}","received_events_url":"https://api.github.com/users/mauritsvanrees/received_events","type":"User","site_admin":false},"body":"Various roughly related changes. The changelog does a good job of describing them.","created_at":"2015-10-27T01:56:19Z","updated_at":"2015-10-27T08:24:34Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6cd0a5b73e4b8bf18c7b608e30b79f80c9b28cc5","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/zestsoftware/zest.releaser/pulls/139/commits","review_comments_url":"https://api.github.com/repos/zestsoftware/zest.releaser/pulls/139/comments","review_comment_url":"https://api.github.com/repos/zestsoftware/zest.releaser/pulls/comments{/number}","comments_url":"https://api.github.com/repos/zestsoftware/zest.releaser/issues/139/comments","statuses_url":"https://api.github.com/repos/zestsoftware/zest.releaser/statuses/a58de107865ec28599cdd31d4fb48f07d670ddbe","head":{"label":"zestsoftware:maurits-check-history","ref":"maurits-check-history","sha":"a58de107865ec28599cdd31d4fb48f07d670ddbe","user":{"login":"zestsoftware","id":1091005,"avatar_url":"https://avatars.githubusercontent.com/u/1091005?v=3","gravatar_id":"","url":"https://api.github.com/users/zestsoftware","html_url":"https://github.com/zestsoftware","followers_url":"https://api.github.com/users/zestsoftware/followers","following_url":"https://api.github.com/users/zestsoftware/following{/other_user}","gists_url":"https://api.github.com/users/zestsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/zestsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zestsoftware/subscriptions","organizations_url":"https://api.github.com/users/zestsoftware/orgs","repos_url":"https://api.github.com/users/zestsoftware/repos","events_url":"https://api.github.com/users/zestsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/zestsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":2601923,"name":"zest.releaser","full_name":"zestsoftware/zest.releaser","owner":{"login":"zestsoftware","id":1091005,"avatar_url":"https://avatars.githubusercontent.com/u/1091005?v=3","gravatar_id":"","url":"https://api.github.com/users/zestsoftware","html_url":"https://github.com/zestsoftware","followers_url":"https://api.github.com/users/zestsoftware/followers","following_url":"https://api.github.com/users/zestsoftware/following{/other_user}","gists_url":"https://api.github.com/users/zestsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/zestsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zestsoftware/subscriptions","organizations_url":"https://api.github.com/users/zestsoftware/orgs","repos_url":"https://api.github.com/users/zestsoftware/repos","events_url":"https://api.github.com/users/zestsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/zestsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zestsoftware/zest.releaser","description":"Python software releasing made easy and repeatable  ","fork":false,"url":"https://api.github.com/repos/zestsoftware/zest.releaser","forks_url":"https://api.github.com/repos/zestsoftware/zest.releaser/forks","keys_url":"https://api.github.com/repos/zestsoftware/zest.releaser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zestsoftware/zest.releaser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zestsoftware/zest.releaser/teams","hooks_url":"https://api.github.com/repos/zestsoftware/zest.releaser/hooks","issue_events_url":"https://api.github.com/repos/zestsoftware/zest.releaser/issues/events{/number}","events_url":"https://api.github.com/repos/zestsoftware/zest.releaser/events","assignees_url":"https://api.github.com/repos/zestsoftware/zest.releaser/assignees{/user}","branches_url":"https://api.github.com/repos/zestsoftware/zest.releaser/branches{/branch}","tags_url":"https://api.github.com/repos/zestsoftware/zest.releaser/tags","blobs_url":"https://api.github.com/repos/zestsoftware/zest.releaser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zestsoftware/zest.releaser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zestsoftware/zest.releaser/git/refs{/sha}","trees_url":"https://api.github.com/repos/zestsoftware/zest.releaser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zestsoftware/zest.releaser/statuses/{sha}","languages_url":"https://api.github.com/repos/zestsoftware/zest.releaser/languages","stargazers_url":"https://api.github.com/repos/zestsoftware/zest.releaser/stargazers","contributors_url":"https://api.github.com/repos/zestsoftware/zest.releaser/contributors","subscribers_url":"https://api.github.com/repos/zestsoftware/zest.releaser/subscribers","subscription_url":"https://api.github.com/repos/zestsoftware/zest.releaser/subscription","commits_url":"https://api.github.com/repos/zestsoftware/zest.releaser/commits{/sha}","git_commits_url":"https://api.github.com/repos/zestsoftware/zest.releaser/git/commits{/sha}","comments_url":"https://api.github.com/repos/zestsoftware/zest.releaser/comments{/number}","issue_comment_url":"https://api.github.com/repos/zestsoftware/zest.releaser/issues/comments{/number}","contents_url":"https://api.github.com/repos/zestsoftware/zest.releaser/contents/{+path}","compare_url":"https://api.github.com/repos/zestsoftware/zest.releaser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zestsoftware/zest.releaser/merges","archive_url":"https://api.github.com/repos/zestsoftware/zest.releaser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zestsoftware/zest.releaser/downloads","issues_url":"https://api.github.com/repos/zestsoftware/zest.releaser/issues{/number}","pulls_url":"https://api.github.com/repos/zestsoftware/zest.releaser/pulls{/number}","milestones_url":"https://api.github.com/repos/zestsoftware/zest.releaser/milestones{/number}","notifications_url":"https://api.github.com/repos/zestsoftware/zest.releaser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zestsoftware/zest.releaser/labels{/name}","releases_url":"https://api.github.com/repos/zestsoftware/zest.releaser/releases{/id}","created_at":"2011-10-18T20:51:45Z","updated_at":"2015-10-12T12:44:21Z","pushed_at":"2015-10-27T02:22:51Z","git_url":"git://github.com/zestsoftware/zest.releaser.git","ssh_url":"git@github.com:zestsoftware/zest.releaser.git","clone_url":"https://github.com/zestsoftware/zest.releaser.git","svn_url":"https://github.com/zestsoftware/zest.releaser","homepage":"http://zestreleaser.readthedocs.org","size":2367,"stargazers_count":64,"watchers_count":64,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":16,"forks":30,"open_issues":16,"watchers":64,"default_branch":"master"}},"base":{"label":"zestsoftware:master","ref":"master","sha":"dd76ff17d6a9f2368fa1781da00e4b881c80221c","user":{"login":"zestsoftware","id":1091005,"avatar_url":"https://avatars.githubusercontent.com/u/1091005?v=3","gravatar_id":"","url":"https://api.github.com/users/zestsoftware","html_url":"https://github.com/zestsoftware","followers_url":"https://api.github.com/users/zestsoftware/followers","following_url":"https://api.github.com/users/zestsoftware/following{/other_user}","gists_url":"https://api.github.com/users/zestsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/zestsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zestsoftware/subscriptions","organizations_url":"https://api.github.com/users/zestsoftware/orgs","repos_url":"https://api.github.com/users/zestsoftware/repos","events_url":"https://api.github.com/users/zestsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/zestsoftware/received_events","type":"Organization","site_admin":false},"repo":{"id":2601923,"name":"zest.releaser","full_name":"zestsoftware/zest.releaser","owner":{"login":"zestsoftware","id":1091005,"avatar_url":"https://avatars.githubusercontent.com/u/1091005?v=3","gravatar_id":"","url":"https://api.github.com/users/zestsoftware","html_url":"https://github.com/zestsoftware","followers_url":"https://api.github.com/users/zestsoftware/followers","following_url":"https://api.github.com/users/zestsoftware/following{/other_user}","gists_url":"https://api.github.com/users/zestsoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/zestsoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zestsoftware/subscriptions","organizations_url":"https://api.github.com/users/zestsoftware/orgs","repos_url":"https://api.github.com/users/zestsoftware/repos","events_url":"https://api.github.com/users/zestsoftware/events{/privacy}","received_events_url":"https://api.github.com/users/zestsoftware/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/zestsoftware/zest.releaser","description":"Python software releasing made easy and repeatable  ","fork":false,"url":"https://api.github.com/repos/zestsoftware/zest.releaser","forks_url":"https://api.github.com/repos/zestsoftware/zest.releaser/forks","keys_url":"https://api.github.com/repos/zestsoftware/zest.releaser/keys{/key_id}","collaborators_url":"https://api.github.com/repos/zestsoftware/zest.releaser/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/zestsoftware/zest.releaser/teams","hooks_url":"https://api.github.com/repos/zestsoftware/zest.releaser/hooks","issue_events_url":"https://api.github.com/repos/zestsoftware/zest.releaser/issues/events{/number}","events_url":"https://api.github.com/repos/zestsoftware/zest.releaser/events","assignees_url":"https://api.github.com/repos/zestsoftware/zest.releaser/assignees{/user}","branches_url":"https://api.github.com/repos/zestsoftware/zest.releaser/branches{/branch}","tags_url":"https://api.github.com/repos/zestsoftware/zest.releaser/tags","blobs_url":"https://api.github.com/repos/zestsoftware/zest.releaser/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/zestsoftware/zest.releaser/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/zestsoftware/zest.releaser/git/refs{/sha}","trees_url":"https://api.github.com/repos/zestsoftware/zest.releaser/git/trees{/sha}","statuses_url":"https://api.github.com/repos/zestsoftware/zest.releaser/statuses/{sha}","languages_url":"https://api.github.com/repos/zestsoftware/zest.releaser/languages","stargazers_url":"https://api.github.com/repos/zestsoftware/zest.releaser/stargazers","contributors_url":"https://api.github.com/repos/zestsoftware/zest.releaser/contributors","subscribers_url":"https://api.github.com/repos/zestsoftware/zest.releaser/subscribers","subscription_url":"https://api.github.com/repos/zestsoftware/zest.releaser/subscription","commits_url":"https://api.github.com/repos/zestsoftware/zest.releaser/commits{/sha}","git_commits_url":"https://api.github.com/repos/zestsoftware/zest.releaser/git/commits{/sha}","comments_url":"https://api.github.com/repos/zestsoftware/zest.releaser/comments{/number}","issue_comment_url":"https://api.github.com/repos/zestsoftware/zest.releaser/issues/comments{/number}","contents_url":"https://api.github.com/repos/zestsoftware/zest.releaser/contents/{+path}","compare_url":"https://api.github.com/repos/zestsoftware/zest.releaser/compare/{base}...{head}","merges_url":"https://api.github.com/repos/zestsoftware/zest.releaser/merges","archive_url":"https://api.github.com/repos/zestsoftware/zest.releaser/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/zestsoftware/zest.releaser/downloads","issues_url":"https://api.github.com/repos/zestsoftware/zest.releaser/issues{/number}","pulls_url":"https://api.github.com/repos/zestsoftware/zest.releaser/pulls{/number}","milestones_url":"https://api.github.com/repos/zestsoftware/zest.releaser/milestones{/number}","notifications_url":"https://api.github.com/repos/zestsoftware/zest.releaser/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/zestsoftware/zest.releaser/labels{/name}","releases_url":"https://api.github.com/repos/zestsoftware/zest.releaser/releases{/id}","created_at":"2011-10-18T20:51:45Z","updated_at":"2015-10-12T12:44:21Z","pushed_at":"2015-10-27T02:22:51Z","git_url":"git://github.com/zestsoftware/zest.releaser.git","ssh_url":"git@github.com:zestsoftware/zest.releaser.git","clone_url":"https://github.com/zestsoftware/zest.releaser.git","svn_url":"https://github.com/zestsoftware/zest.releaser","homepage":"http://zestreleaser.readthedocs.org","size":2367,"stargazers_count":64,"watchers_count":64,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"open_issues_count":16,"forks":30,"open_issues":16,"watchers":64,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/zestsoftware/zest.releaser/pulls/139"},"html":{"href":"https://github.com/zestsoftware/zest.releaser/pull/139"},"issue":{"href":"https://api.github.com/repos/zestsoftware/zest.releaser/issues/139"},"comments":{"href":"https://api.github.com/repos/zestsoftware/zest.releaser/issues/139/comments"},"review_comments":{"href":"https://api.github.com/repos/zestsoftware/zest.releaser/pulls/139/comments"},"review_comment":{"href":"https://api.github.com/repos/zestsoftware/zest.releaser/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/zestsoftware/zest.releaser/pulls/139/commits"},"statuses":{"href":"https://api.github.com/repos/zestsoftware/zest.releaser/statuses/a58de107865ec28599cdd31d4fb48f07d670ddbe"}}}}