Gets the summary for an issue in a repository
543530
@RequestMapping(value = "configuration/{configuration:.*}/issue/{key}", method = RequestMethod.GET)
    public Resource<OntrackSVNIssueInfo> issueInfo(@PathVariable String configuration, @PathVariable String key) {
        return Resource.of(
                svnInfoService.getIssueInfo(configuration, key),
                uri(on(getClass()).issueInfo(configuration, key))
        ).withView(Build.class);
    }
876531
def repository(self, only):
        
        print("\nCheck and update repositories:\n")
        default = self.meta.default_repositories
        enabled = self.meta.repositories
        if only:
            enabled = only
        for repo in enabled:
            if check_for_local_repos(repo) is True:
                continue
            sys.stdout.write("{0}Check repository [{1}{2}{3}] ... "
                             "{4}".format(
                                    self.meta.color["GREY"],
                                    self.meta.color["CYAN"], repo,
                                    self.meta.color["GREY"],
                                    self.meta.color["ENDC"]))
            sys.stdout.flush()
            if repo in default:
                exec("{0}.{1}()".format(self._init, repo))
                sys.stdout.write(self.done)
            elif repo in enabled:
                Initialization(False).custom(repo)
                sys.stdout.write(self.done)
            else:
                sys.stdout.write(self.error)
        print("")   # new line at end
        raise SystemExit()
233797
def get_summary(self):
        
        return (self.contract.name, self.full_name, self.visibility,
                [str(x) for x in self.modifiers],
                [str(x) for x in self.state_variables_read + self.solidity_variables_read],
                [str(x) for x in self.state_variables_written],
                [str(x) for x in self.internal_calls],
                [str(x) for x in self.external_calls_as_expressions])
236422
def view(self, repo):
        
        status = "{0}disabled{1}".format(self.meta.color["RED"],
                                         self.meta.color["ENDC"])
        self.form["Status:"] = status
        self.form["Default:"] = "no"
        if repo in self.meta.default_repositories:
            self.form["Default:"] = "yes"
        if (repo in self.meta.repositories and
                os.path.isfile(self.meta.lib_path + "{0}_repo/PACKAGES."
                               "TXT".format(repo))):
            status = "{0}enabled{1}".format(self.meta.color["GREEN"],
                                            self.meta.color["ENDC"])
            if repo != "sbo":
                data = self.repository_data(repo)
                size = units(data[1], data[2])
                self.form["Repo id:"] = repo
                self.form["Repo url:"] = self.all_repos[repo]
                self.form["Total compressed packages:"] = "{0} {1}".format(
                    str(size[1][0]), str(size[0][0]))
                self.form["Total uncompressed packages:"] = "{0} {1}".format(
                    str(size[1][1]), str(size[0][1]))
                self.form["Number of packages:"] = data[0]
                self.form["Status:"] = status
                self.form["Last updated:"] = data[3]
        elif (repo == "sbo" and os.path.isfile(self.meta.lib_path + "{0}_repo/"
                                               "SLACKBUILDS.TXT".format(repo))):
            status = "{0}enabled{1}".format(self.meta.color["GREEN"],
                                            self.meta.color["ENDC"])
            sum_sbo_pkgs = 0
            for line in (Utils().read_file(
                    self.meta.lib_path + "sbo_repo/SLACKBUILDS."
                    "TXT").splitlines()):
                if line.startswith("SLACKBUILD NAME: "):
                    sum_sbo_pkgs += 1
            changelog_txt = Utils().read_file(
                self.meta.log_path + "sbo/ChangeLog.txt")
            last_upd = changelog_txt.split("\n", 1)[0]
            self.form["Repo id:"] = repo
            self.form["Repo url:"] = self.all_repos[repo]
            self.form["Total compressed packages:"] = ""
            self.form["Total uncompressed packages:"] = ""
            self.form["Number of packages:"] = sum_sbo_pkgs
            self.form["Status:"] = status
            self.form["Last updated:"] = last_upd
        print("")
        for key, value in sorted(self.form.iteritems()):
            print self.meta.color["GREY"] + key + self.meta.color["ENDC"], value
        print("")
        raise SystemExit()
1229289
def get_repos(self):
        
        url_parameters = dict()

        return github.PaginatedList.PaginatedList(
            contentClass=github.Repository.Repository,
            requester=self._requester,
            firstUrl="/installation/repositories",
            firstParams=url_parameters,
            headers=INTEGRATION_PREVIEW_HEADERS,
            list_item='repositories'
        )
1298449
def report(issues, show_urls=False):
    
    # titles may have unicode in them, so we must encode everything below
    if show_urls:
        for i in issues:
            print(u'#%d: %s' % (i['number'],
                                      i['title'].replace(u'`', u'``')))
    else:
        for i in issues:
            print(u'* %d: %s' % (i['number'], i['title'].replace(u'`', u'``')))
158007
def get_issue(self, number):
        
        assert isinstance(number, (int, long)), number
        headers, data = self._requester.requestJsonAndCheck(
            "GET",
            self.url + "/issues/" + str(number)
        )
        return github.Issue.Issue(self._requester, headers, data, completed=True)
1146821
def acl(self):
        """"""
        r = fapi.get_repository_method_acl(
            self.namespace, self.name, self.snapshot_id, self.api_url)
        fapi._check_response_code(r, 200)
        return r.json()
787281
def summary(self):
        """"""
        if self._summary is None:
            self._summary = "No summary for element."
            for doc in self.docstring:
                if doc.doctype == "summary":
                    self._summary = doc.contents
                    break

            #If a parameter, member or local tag has dimensions or other children,
            #then the inner-text is not the right thing to use; find a grand-child
            #summary tag instead.
            if self._summary == "No summary for element." and len(self.docstring) > 0:
                summary = self.doc_children("summary")
                if len(summary) > 0:
                    self._summary = summary[0].contents
                else:
                    self._summary = self.docstring[0].contents

        return self._summary
987769
def check_summary(package_info, *args):
    
    reason = "Summary missing"
    result = False

    if package_info.get('summary') not in BAD_VALUES:
        result = True

    return result, reason, HAS_SUMMARY
611690
def get_bugs_summaries(self, bugids):
        
        payload = {'ids': bugids, 'include_fields': ['id', 'summary']}
        d = self.call('Bug.get', payload)
        d.addCallback(self._parse_bugs_callback)
        return d
325184
def GetSummary(self):
    
    summary = rdf_client.ClientSummary()
    summary.client_id = self.client_id
    summary.timestamp = self.timestamp

    summary.system_info.release = self.os_release
    summary.system_info.version = str(self.os_version or "")
    summary.system_info.kernel = self.kernel
    summary.system_info.machine = self.arch
    summary.system_info.install_date = self.install_time
    kb = self.knowledge_base
    if kb:
      summary.system_info.fqdn = kb.fqdn
      summary.system_info.system = kb.os
      summary.users = kb.users
      summary.interfaces = self.interfaces
      summary.client_info = self.startup_info.client_info
      if kb.os_release:
        summary.system_info.release = kb.os_release
        if kb.os_major_version:
          summary.system_info.version = "%d.%d" % (kb.os_major_version,
                                                   kb.os_minor_version)

    hwi = self.hardware_info
    if hwi:
      summary.serial_number = hwi.serial_number
      summary.system_manufacturer = hwi.system_manufacturer
      summary.system_uuid = hwi.system_uuid

    cloud_instance = self.cloud_instance
    if cloud_instance:
      summary.cloud_type = cloud_instance.cloud_type
      if cloud_instance.cloud_type == "GOOGLE":
        summary.cloud_instance_id = cloud_instance.google.unique_id
      elif cloud_instance.cloud_type == "AMAZON":
        summary.cloud_instance_id = cloud_instance.amazon.instance_id
      else:
        raise ValueError("Bad cloud type: %s" % cloud_instance.cloud_type)
    return summary
1323246
def make_report(storage_directory, old_pins, new_pins, do_update=False,
                version_mappings=None):
    """"""
    report = ""
    version_mappings = version_mappings or {}
    for new_pin in new_pins:
        repo_name, repo_url, commit_sha = new_pin
        commit_sha = version_mappings.get(repo_name, {}
                                          ).get(commit_sha, commit_sha)

        # Prepare our repo directory and clone the repo if needed. Only pull
        # if the user requests it.
        repo_dir = "{0}/{1}".format(storage_directory, repo_name)
        update_repo(repo_dir, repo_url, do_update)

        # Get the old SHA from the previous pins. If this pin didn't exist
        # in the previous OSA revision, skip it. This could happen with newly-
        # added projects and roles.
        try:
            commit_sha_old = next(x[2] for x in old_pins if x[0] == repo_name)
        except Exception:
            continue
        else:
            commit_sha_old = version_mappings.get(repo_name, {}
                                                  ).get(commit_sha_old,
                                                        commit_sha_old)

        # Loop through the commits and render our template.
        validate_commits(repo_dir, [commit_sha_old, commit_sha])
        commits = get_commits(repo_dir, commit_sha_old, commit_sha)
        template_vars = {
            'repo': repo_name,
            'commits': commits,
            'commit_base_url': get_commit_url(repo_url),
            'old_sha': commit_sha_old,
            'new_sha': commit_sha
        }
        rst = render_template('offline-repo-changes.j2', template_vars)
        report += rst

    return report
598370
def repository_data(self, repo):
        
        sum_pkgs, size, unsize, last_upd = 0, [], [], ""
        for line in (Utils().read_file(
                self.meta.lib_path + repo + "_repo/PACKAGES.TXT").splitlines()):
            if line.startswith("PACKAGES.TXT;"):
                last_upd = line[14:].strip()
            if line.startswith("PACKAGE NAME:"):
                sum_pkgs += 1
            if line.startswith("PACKAGE SIZE (compressed):  "):
                size.append(line[28:-2].strip())
            if line.startswith("PACKAGE SIZE (uncompressed):  "):
                unsize.append(line[30:-2].strip())
        if repo in ["salix", "slackl"]:
            log = Utils().read_file(
                self.meta.log_path + "{0}/ChangeLog.txt".format(repo))
            last_upd = log.split("\n", 1)[0]
        return [sum_pkgs, size, unsize, last_upd]
581799
def get_summary(self):
        
        return {
            "count": self.count(),
            "pass": self.success_count(),
            "fail": self.failure_count(),
            "skip": self.skip_count(),
            "inconclusive": self.inconclusive_count(),
            "retries": self.retry_count(),
            "duration": self.total_duration()
        }
252810
def summary(self):
        
        for line in self.docstring.splitlines():
            line = line.strip()
            if line:
                return line

        return ""
658228
def get_summary_string(self):
        """"""
        rows = [["PLUGIN TYPE", "NAME", "DESCRIPTION", "STATUS"],
                ["-----------", "----", "-----------", "------"]]
        for plugin_type in sorted(self.get_plugin_types()):
            type_name = plugin_type.replace('_', ' ')
            for name in sorted(self.get_plugins(plugin_type)):
                module = self.get_plugin_module(plugin_type, name)
                desc = (getattr(module, "__doc__", None) or '').strip()
                rows.append((type_name, name, desc, "loaded"))
            for (name, reason) in sorted(self.get_failed_plugins(plugin_type)):
                msg = "FAILED: %s" % reason
                rows.append((type_name, name, '', msg))
        return '\n'.join(columnise(rows))