Get issue labels.
        :param issue_key:
        :return:
763164
def get_issue_labels(self, issue_key):
        
        url = 'rest/api/2/issue/{issue_key}?fields=labels'.format(issue_key=issue_key)
        return (self.get(url) or {}).get('fields').get('labels')
380618
def _format_issue_url(self):
        """"""
        query = urlencode({
            'title': self._format_issue_title(),
            'body': self._format_issue_body(),
        })
        return self.REPO_URL + self.ISSUE_SUFFIX + '?' + query
650508
def _handle_status(self, key, value):
        
        if key in ("DELETE_PROBLEM", "KEY_CONSIDERED"):
            self.status = self.problem_reason.get(value, "Unknown error: %r"
                                                  % value)
        else:
            raise ValueError("Unknown status message: %r" % key)
874716
def add_issue_type(self, name, **attrs):
        
        return IssueTypes(self.requester).create(self.id, name, **attrs)
334576
def get_issues():
        """"""
        issues = []
        for entry in Logger.journal:
            if entry.level >= WARNING:
                issues.append(entry)
        return issues
518399
def all_issues(issues):
    """"""
    logging.info('finding issues...')
    seen = set()
    for issue in issues:
        if issue['title'] not in seen:
            seen.add(issue['title'])
            yield issue
213918
def call(issue)
      status = decode_status(issue)
      {
          key: issue.key,
          type: issue.issuetype.name,
          priority: issue.priority.name,
          status: status,
          #description: i.description,
          summary: issue.summary,
          created_date: issue.created,
          closed_date: issue.resolutiondate
      }
    end
952844
def fetch_events_async(issues)
      i       = 0
      threads = []

      issues.each_slice(MAX_THREAD_NUMBER) do |issues_slice|
        issues_slice.each do |issue|
          threads << Thread.new do
            issue["events"] = []
            iterate_pages(@client, "issue_events", issue["number"]) do |new_event|
              issue["events"].concat(new_event)
            end
            issue["events"] = issue["events"].map { |event| stringify_keys_deep(event.to_hash) }
            print_in_same_line("Fetching events for issues and PR: #{i + 1}/#{issues.count}")
            i += 1
          end
        end
        threads.each(&:join)
        threads = []
      end

      # to clear line from prev print
      print_empty_line

      Helper.log.info "Fetching events for issues and PR: #{i}"
    end
653406
def format_issue(issue)
      t(config.format == 'one-line' ? 'issue.oneline' : 'issue.details',
        key: issue.key,
        summary: issue.summary,
        status: issue.status.name,
        assigned: optional_issue_property('unassigned') { issue.assignee.displayName },
        fixVersion: optional_issue_property('none') { issue.fixVersions.first['name'] },
        priority: optional_issue_property('none') { issue.priority.name },
        url: format_issue_link(issue.key))
    end
401010
def get_label(key):
    
    if key in rel:
        if mpl.rcParams['text.usetex']:
            return rel[key]['label_latex']
        else:
            return rel[key]['label_mpl']
    else:
        return key
1221872
def issue(self, number):
        
        json = None
        if int(number) > 0:
            url = self._build_url('issues', str(number), base_url=self._api)
            json = self._json(self._get(url), 200)
        return Issue(json, self) if json else None
1035563
def get_labels(self):
        
        return github.PaginatedList.PaginatedList(
            github.Label.Label,
            self._requester,
            self.issue_url + "/labels",
            None
        )
1049738
def as_issue(self):
        
        headers, data = self._requester.requestJsonAndCheck(
            "GET",
            self.issue_url
        )
        return github.Issue.Issue(self._requester, headers, data, completed=True)
185238
def get_flag_record(self, feature_key: str) -> str:
        
        key_name = self._format_key_name()
        flag = self.redis.hget(key_name, feature_key)

        if flag is None:
            raise KeyError('Redis key: {0} not found.'.format(key_name))

        return flag
41416
public function closeIssue($issue_key)
	{
		$result = array();

		// Get available transitions.
		$tmp_transitions = $this->getTransitions($issue_key, array());
		$tmp_transitions_result = $tmp_transitions->getResult();
		$transitions = $tmp_transitions_result['transitions'];

		// Look for "Close Issue" transition in issue transitions.
		foreach ( $transitions as $v ) {
			// Close issue if required id was found.
			if ( $v['name'] == 'Close Issue' ) {
				$result = $this->transition(
					$issue_key,
					array(
						'transition' => array('id' => $v['id']),
					)
				);
				break;
			}
		}

		return $result;
	}
765047
public String[] getIssueKeys() {
        Issues issues = getAnnotation(Issues.class);
        if (issues == null) {
            return new String[0];
        }
        List<String> keys = new ArrayList<>();
        for (Issue issue : issues.value()) {
            keys.add(issue.value());
        }
        return keys.toArray(new String[keys.size()]);
    }
148877
def sort_labeled_issues(issues)
      sorted_issues = []
      issues.each do |issue|
        label_names = issue["labels"].collect { |l| l["name"] }

        # Add PRs in the order of the @sections array. This will either be the
        # default sections followed by any --add-sections sections in
        # user-defined order, or --configure-sections in user-defined order.
        # Ignore the order of the issue labels from github which cannot be
        # controled by the user.
        @sections.each do |section|
          unless (section.labels & label_names).empty?
            section.issues << issue
            sorted_issues << issue
            break
          end
        end
      end
      issues - sorted_issues
    end