def _get_receivers_list(self):

        # TODO: document what this plugin expects to be in Dockerfile/where it gets info from
        global_component = self._get_component_label()
        # this relies on bump_release plugin configuring source.git_commit to actually be
        #  branch name, not a commit
        if not isinstance(self.workflow.source, GitSource):
            raise PluginFailedException('Source is not of type "GitSource", panic!')
        git_branch = self.workflow.source.git_commit
        try:
            r = requests.get(urljoin(self.pdc_url, 'rest_api/v1/release-component-contacts/'),
                             headers={'Authorization': 'Token %s' % self._get_pdc_token()},
                             params={'global_component': global_component,
                                     'dist_git_branch': git_branch,
                                     'role': self.pdc_contact_role},
                             verify=self.pdc_verify_cert)
        except requests.RequestException as e:
            self.log.error('failed to connect to PDC: %s', str(e))
            raise RuntimeError(e)

        if r.status_code != 200:
            self.log.error('PDC returned status code %s, full response: %s',
                           r.status_code, r.text)
            raise RuntimeError('PDC returned non-200 status code (%s), see referenced build log' %
                               r.status_code)

        contacts = r.json()

        if contacts['count'] == 0:
            self.log.error('no %s role for the component', self.pdc_contact_role)
            raise RuntimeError('no %s role for the component' % self.pdc_contact_role)

        send_to = []
        for contact in contacts['results']:
            send_to.append(contact['contact']['email'])

        return send_to
Delete a specific marker
dataset/ETHPy150Open projectatomic/atomic-reactor/atomic_reactor/plugins/exit_sendmail.py/SendMailPlugin._get_receivers_list--crossover with--dataset/ETHPy150Open kivy/kivy-ios/toolchain.py/Recipe.delete_marker