Use the issues api so specify the creator
555044
def pull_requests(repo_name)
      org_name = org_name_from(repo_name)

      unless @block
        if @org_name == org_name
          print '-'
        else
          puts ''
          print "#{org_name} -"
          @org_name = org_name
        end
      end

      issues = @client.issues(repo_name, creator: @login, state: 'open').
        select { |issue| issue.pull_request }
      issues.concat @client.issues(repo_name, creator: @login, state: 'closed').
        select { |issue| issue.pull_request }

      @block.call(repo_name, issues) if @block

      issues
    rescue Octokit::ClientError
    rescue => e
      puts e
    end
734925
def createissue(accountable, options):
    
    issue = accountable.issue_create(options)
    headers = sorted(['id', 'key', 'self'])
    rows = [headers, [itemgetter(header)(issue) for header in headers]]
    print_table(SingleTable(rows))
447562
def issue_comments(self, issue_id_or_key, extra_query_params={}):
        
        return self.do("GET", "issues/{issue_id_or_key}/comments",
                        url_params={"issue_id_or_key": issue_id_or_key},
                        query_params=extra_query_params
                        )
349905
def _create_task_problem(self, problemid, problem_content, task_problem_types):
        """"""
        # Basic checks
        if not id_checker(problemid):
            raise Exception("Invalid problem _id: " + problemid)
        if problem_content.get('type', "") not in task_problem_types:
            raise Exception("Invalid type for problem " + problemid)

        return task_problem_types.get(problem_content.get('type', ""))(self, problemid, problem_content, self._translations)
372358
def add_issue_status(self, name, **attrs):
        
        return IssueStatuses(self.requester).create(self.id, name, **attrs)
208812
def relevant_issues(issues, after):
    """"""
    logging.info('finding relevant issues after {}...'.format(after))
    seen = set()
    for issue in issues:
        if relevent_issue(issue, after) and issue['title'] not in seen:
            seen.add(issue['title'])
            yield issue
173434
def edit(user_name, repo_name, comment_id, params={})
      _update_user_repo_params(user_name, repo_name)
      _validate_user_repo_params(user, repo) unless user? && repo?
      _validate_presence_of comment_id

      normalize! params
      # _merge_mime_type(:issue_comment, params)
      filter! VALID_ISSUE_COMMENT_PARAM_NAME, params
      assert_required_keys(%w[ content ], params)

      put_request("/1.0/repositories/#{user}/#{repo.downcase}/issues/comments/#{comment_id}", params)
    end
365552
def _create(self):
        """"""
        con = self._creator(*self._args, **self._kwargs)
        try:
            try:
                if self._dbapi.connect != self._creator:
                    raise AttributeError
            except AttributeError:
                # try finding the DB-API 2 module via the connection itself
                try:
                    mod = con.__module__
                except AttributeError:
                    mod = None
                while mod:
                    try:
                        self._dbapi = sys.modules[mod]
                        if not callable(self._dbapi.connect):
                            raise AttributeError
                    except (AttributeError, KeyError):
                        pass
                    else:
                        break
                    i = mod.rfind('.')
                    if i < 0:
                        mod = None
                    else:
                        mod = mod[:i]
                else:
                    try:
                        mod = con.OperationalError.__module__
                    except AttributeError:
                        mod = None
                    while mod:
                        try:
                            self._dbapi = sys.modules[mod]
                            if not callable(self._dbapi.connect):
                                raise AttributeError
                        except (AttributeError, KeyError):
                            pass
                        else:
                            break
                        i = mod.rfind('.')
                        if i < 0:
                            mod = None
                        else:
                            mod = mod[:i]
                    else:
                        self._dbapi = None
            if self._threadsafety is None:
                try:
                    self._threadsafety = self._dbapi.threadsafety
                except AttributeError:
                    try:
                        self._threadsafety = con.threadsafety
                    except AttributeError:
                        pass
            if self._failures is None:
                try:
                    self._failures = (
                        self._dbapi.OperationalError,
                        self._dbapi.InternalError)
                except AttributeError:
                    try:
                        self._failures = (
                            self._creator.OperationalError,
                            self._creator.InternalError)
                    except AttributeError:
                        try:
                            self._failures = (
                                con.OperationalError, con.InternalError)
                        except AttributeError:
                            raise AttributeError(
                                "Could not determine failure exceptions"
                                " (please set failures or creator.dbapi).")
            if isinstance(self._failures, tuple):
                self._failure = self._failures[0]
            else:
                self._failure = self._failures
            self._setsession(con)
        except Exception as error:
            # the database module could not be determined
            # or the session could not be prepared
            try:  # close the connection first
                con.close()
            except Exception:
                pass
            raise error  # re-raise the original error again
        return con
990711
def get_issues_url(page, after):
    """"""
    template = '{base_url}/{owner}/{repo}/issues?state=closed&per_page=100&page={page}&since={after}'
    return template.format(page=page, after=after.isoformat(), **API_PARAMS)
758270
public function issueCreate($title, $description, $assignee_email, $labels='') {
        
        $post = [
            'id' => $this->id,
            'title' => $title,
            'description' => $description
        ];
        
        if($assignee_email){
            $user = new \sb\Gitlab\User($assignee_email, $this->_client);
            $post['assignee_id']= $user->id;
        }
        
       $response = $this->_client->get('/projects/'.$this->id.'/issues',$post);
       if($response){
           return \sb\Gitlab\Issue::fromObject($response);
       }
    }
1329897
def sender(self, issues):
        

        for issue in issues:
            state = self.get_state(issue.state)
            if issue.number:
                try:
                    gh_issue = self.repo.get_issue(issue.number)
                    original_state = gh_issue.state
                    if original_state == state:
                        action = 'Updated'
                    elif original_state == 'closed':
                        action = 'Reopened'
                    else:
                        action = 'Closed'

                    gh_issue.edit(title=issue.title,
                                  body=issue.body,
                                  labels=issue.labels,
                                  milestone=self.get_milestone(issue.milestone),
                                  assignee=self.get_assignee(issue.assignee),
                                  state=self.get_state(issue.state)
                                  )
                    print('{} #{}: {}'.format(action, gh_issue.number, gh_issue.title))
                except GithubException:
                    print('Not found #{}: {} (ignored)'.format(issue.number, issue.title))
                    continue
            else:
                gh_issue = self.repo.create_issue(title=issue.title,
                                                  body=issue.body,
                                                  labels=issue.labels,
                                                  milestone=self.get_milestone(issue.milestone),
                                                  assignee=self.get_assignee(issue.assignee))
                print('Created #{}: {}'.format(gh_issue.number, gh_issue.title))
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')
1049738
def as_issue(self):
        
        headers, data = self._requester.requestJsonAndCheck(
            "GET",
            self.issue_url
        )
        return github.Issue.Issue(self._requester, headers, data, completed=True)
1239136
def build_from_issues(gh_token, body):
    
    if body["action"] in ["opened", "edited"]:
        github_con = Github(gh_token)
        repo = github_con.get_repo(body['repository']['full_name'])
        issue = repo.get_issue(body['issue']['number'])
        text = body['issue']['body']
        comment = issue  # It's where we update the comment: in the issue itself
        return WebhookMetadata(repo, issue, text, comment)
    return None
661788
public static Creator create(String accessPolicyId, String assetId,
            LocatorType locatorType) {
        return new Creator(accessPolicyId, assetId, locatorType);
    }
179764
function UserArtists(props) {
    let url = BASE_URL;
    let options = { ...props.options, type: 'artist' };

    return (
        <ApiRequest url={url} options={options}>
            {(data, loading, error) => props.children(data, loading, error)}
        </ApiRequest>
    );
}
580518
def issue(self, invoice_id, **kwargs):
        "
        url = "{}/{}/issue".format(self.base_url, invoice_id)
        return self.post_url(url, {}, **kwargs)