根据需求补充文章列表数据
@param  {Object} issues issues请求数据
@return {Object}        分页及文章列表数据
180897
function getPostList(issues) {
  if (!issues.body || !issues.headers) return;

  let pageInfo = getPage(issues.headers.link);
  let pageList = [];

  issues.body.forEach((item) => {
    // 如果文章不存在分类，则不展示出来，该功能先取消
    // if (!item.labels || item.labels.length === 0) return;

    pageList.push(getPost(item));
  });

  return {
    page: pageInfo,
    list: pageList
  }
}
433030
def get_issue_comments(self):
        
        return github.PaginatedList.PaginatedList(
            github.IssueComment.IssueComment,
            self._requester,
            self.issue_url + "/comments",
            None
        )
334576
def get_issues():
        """"""
        issues = []
        for entry in Logger.journal:
            if entry.level >= WARNING:
                issues.append(entry)
        return issues
1049738
def as_issue(self):
        
        headers, data = self._requester.requestJsonAndCheck(
            "GET",
            self.issue_url
        )
        return github.Issue.Issue(self._requester, headers, data, completed=True)
1334709
public void setIssues(java.util.Collection<String> issues) {
        if (issues == null) {
            this.issues = null;
            return;
        }

        this.issues = new java.util.ArrayList<String>(issues);
    }
140230
def list_migration_issues_accounts(self, account_id, content_migration_id):
        
        path = {}
        data = {}
        params = {}

        # REQUIRED - PATH - account_id
        """ID"""
        path["account_id"] = account_id

        # REQUIRED - PATH - content_migration_id
        """ID"""
        path["content_migration_id"] = content_migration_id

        self.logger.debug("GET /api/v1/accounts/{account_id}/content_migrations/{content_migration_id}/migration_issues with query params: {params} and form data: {data}".format(params=params, data=data, **path))
        return self.generic_request("GET", "/api/v1/accounts/{account_id}/content_migrations/{content_migration_id}/migration_issues".format(**path), data=data, params=params, all_pages=True)
18324
def issue(self, issue_instance_id):
        
        with self.db.make_session() as session:
            selected_issue = (
                session.query(IssueInstance)
                .filter(IssueInstance.id == issue_instance_id)
                .scalar()
            )

            if selected_issue is None:
                self.warning(
                    f"Issue {issue_instance_id} doesn't exist. "
                    "Type 'issues' for available issues."
                )
                return

            self.sources = self._get_leaves_issue_instance(
                session, issue_instance_id, SharedTextKind.SOURCE
            )

            self.sinks = self._get_leaves_issue_instance(
                session, issue_instance_id, SharedTextKind.SINK
            )

        self.current_issue_instance_id = int(selected_issue.id)
        self.current_frame_id = -1
        self.current_trace_frame_index = 1  # first one after the source

        print(f"Set issue to {issue_instance_id}.")
        if int(selected_issue.run_id) != self.current_run_id:
            self.current_run_id = int(selected_issue.run_id)
            print(f"Set run to {self.current_run_id}.")
        print()

        self._generate_trace_from_issue()
        self.show()
1083072
def get(issue_id, issue_type_id):
        
        return db.Issue.find_one(
            Issue.issue_id == issue_id,
            Issue.issue_type_id == issue_type_id
        )
1212770
def find_issues(self, criteria={}, jql=None, order='KEY ASC', verbose=False, changelog=True):
        

        query = []

        if criteria.get('project', False):
            query.append('project IN (%s)' % ', '.join(['"%s"' % p for p in criteria['project']]))

        if criteria.get('issue_types', False):
            query.append('issueType IN (%s)' % ', '.join(['"%s"' % t for t in criteria['issue_types']]))

        if criteria.get('valid_resolutions', False):
            query.append('(resolution IS EMPTY OR resolution IN (%s))' % ', '.join(['"%s"' % r for r in criteria['valid_resolutions']]))

        if criteria.get('jql_filter') is not None:
            query.append('(%s)' % criteria['jql_filter'])

        if jql is not None:
            query.append('(%s)' % jql)

        queryString = "%s ORDER BY %s" % (' AND '.join(query), order,)

        if verbose:
            print("Fetching issues with query:", queryString)

        fromRow=0
        issues = []
        while True:
            try:
                if changelog:
                    pageofissues = self.jira.search_issues(queryString, expand='changelog', maxResults=self.settings['max_results'],startAt=fromRow)
                else:
                    pageofissues = self.jira.search_issues(queryString, maxResults=self.settings['max_results'],startAt=fromRow)

                fromRow = fromRow + int(self.settings['max_results'])
                issues += pageofissues
                if verbose:
                    print("Got %s lines per jira query from result starting at line number %s " % (self.settings['max_results'],  fromRow))
                if len(pageofissues)==0:
                    break
            except JIRAError as e:
                print("Jira query error with: {}\n{}".format(queryString, e))
                return []


        if verbose:
            print("Fetched", len(issues), "issues")

        return issues
1011913
def number_of_issues_by_year(self, issn, collection, years=0, type=None):
        

        body = {
            "query": {
                "bool": {
                    "must": [
                        {
                            "match": {
                                "issn": issn
                            }
                        },
                        {
                            "match": {
                                "collection": collection
                            }
                        }
                    ]
                }
            },
            "aggs": {
                "issue": {
                    "cardinality": {
                        "field": "issue"
                    }
                }
            }

        }

        if type:
            body['query']['bool']['must'].append({"match": {"issue_type": type}})

        if years != 0:
            body['aggs'] = {
                "publication_year": {
                    "terms": {
                        "field": "publication_year",
                        "size": years,
                        "order": {
                            "_term": 'desc'
                        }
                    },
                    "aggs": {
                        "issue": {
                            "cardinality": {
                                "field": "issue"
                            }
                        }
                    }
                }
            }

        query_parameters = [
            ('size', '0')
        ]

        query_result = self.search(
            'article', json.dumps(body), query_parameters
        )

        return self._compute_number_of_issues_by_year(
            query_result, years=years)
741602
protected function getIssueListing()
    {
        $issues = $this
            ->taskGitHubIssueList(
                $this->getToken(),
                $this->getAccount(),
                $this->getRepository()
            )
            ->run();

        $listing = [];
        foreach ($issues as $issue) {
            if (!isset($issue['title'])) {
                continue;
            }
            $number = $issue['number'];
            $listing[$number] = $issue['title'];
        }

        return $listing;
    }
770201
public function getIssues(): array
    {
        usort(
            $this->issues,
            function (Issue $a, Issue $b) {
                return $a->getLine() - $b->getLine();
            }
        );
        return $this->issues;
    }
464011
public Issue issue(String name, Retrospective retrospective, Map<String, Object> attributes) {
        Issue issue = new Issue(instance);

        issue.setName(name);
        issue.setProject(retrospective.getProject());
        addAttributes(issue, attributes);
        issue.save();
        issue.getRetrospectives().add(retrospective);
        return issue;
    }
320162
def get_issues_by_resource(resource_id, table):
    """"""

    v1_utils.verify_existence_and_get(resource_id, table)

    # When retrieving the issues for a job, we actually retrieve
    # the issues attach to the job itself + the issues attached to
    # the components the job has been run with.
    if table.name == 'jobs':
        JJI = models.JOIN_JOBS_ISSUES
        JJC = models.JOIN_JOBS_COMPONENTS
        JCI = models.JOIN_COMPONENTS_ISSUES

        # Get all the issues attach to all the components attach to a job
        j1 = sql.join(
            _TABLE,
            sql.join(
                JCI,
                JJC,
                sql.and_(
                    JCI.c.component_id == JJC.c.component_id,
                    JJC.c.job_id == resource_id,
                ),
            ),
            _TABLE.c.id == JCI.c.issue_id,
        )

        query = sql.select([_TABLE]).select_from(j1)
        rows = flask.g.db_conn.execute(query)
        rows = [dict(row) for row in rows]

        # Get all the issues attach to a job
        j2 = sql.join(
            _TABLE,
            JJI,
            sql.and_(
                _TABLE.c.id == JJI.c.issue_id,
                JJI.c.job_id == resource_id
            )
        )
        query2 = sql.select([_TABLE]).select_from(j2)
        rows2 = flask.g.db_conn.execute(query2)
        rows += [dict(row) for row in rows2]

    # When retrieving the issues for a component, we only retrieve the
    # issues attached to the specified component.
    else:
        JCI = models.JOIN_COMPONENTS_ISSUES

        query = (sql.select([_TABLE])
                 .select_from(JCI.join(_TABLE))
                 .where(JCI.c.component_id == resource_id))

        rows = flask.g.db_conn.execute(query)
        rows = [dict(row) for row in rows]

    for row in rows:
        if row['tracker'] == 'github':
            l_tracker = github.Github(row['url'])
        elif row['tracker'] == 'bugzilla':
            l_tracker = bugzilla.Bugzilla(row['url'])
        row.update(l_tracker.dump())

    return flask.jsonify({'issues': rows,
                          '_meta': {'count': len(rows)}})
410118
def get_issues_pulls(repository)
      issues = @octokit.list_issues(repository, state: 'all')
      pulls = @octokit.pull_requests(repository, state: 'all')
      issues_open = 0
      issues_closed = 0
      pulls_open = 0
      pulls_closed = 0
      pulls_merged = 0
      issues.each do |i|
        issues_open += 1 if i['state'] == 'open'
        issues_closed += 1 if i['state'] == 'closed'
      end
      pulls.each do |p|
        pulls_open += 1 if p['state'] == 'open'
        if p['state'] == 'closed'
          pulls_merged += 1 unless p['merged_at'].nil?
          pulls_closed += 1 if p['merged_at'].nil?
        end
      end

      {
        issues: {
          closed: issues_closed,
          open: issues_open
        },
        pulls: {
          closed: pulls_closed,
          open: pulls_open,
          merged: pulls_merged
        }
      }
    end
706281
def find_issues_to_add(all_issues, tag_name)
      all_issues.select do |issue|
        if issue["milestone"].nil?
          false
        else
          # check, that this milestone in tag list:
          milestone_is_tag = @filtered_tags.find do |tag|
            tag["name"] == issue["milestone"]["title"]
          end

          if milestone_is_tag.nil?
            false
          else
            issue["milestone"]["title"] == tag_name
          end
        end
      end
    end
958773
public List<IssueCategory> getIssueCategories()
    {
        return this.issueCategories.values().stream()
                    .sorted((category1, category2) -> category1.getPriority() - category2.getPriority())
                    .collect(Collectors.toList());
    }