Class: Gitdig::Commands::Pr::Team

Inherits:
Gitdig::Command show all
Defined in:
lib/gitdig/commands/pr/team.rb

Constant Summary collapse

REPO_REGEX =
%r{[^/]+/[^/]+$}.freeze

Constants inherited from Gitdig::Command

Gitdig::Command::CONFIG_FILE

Instance Method Summary collapse

Methods inherited from Gitdig::Command

#command, #configs, #cursor, #editor, #exec_exist?, #generator, #github_client, #pager, #platform, #prompt, #screen, #which

Constructor Details

#initialize(team_id, options) ⇒ Team

Returns a new instance of Team.



11
12
13
14
# File 'lib/gitdig/commands/pr/team.rb', line 11

def initialize(team_id, options)
  @team_id = team_id
  @options = options
end

Instance Method Details

#execute(input: $stdin, output: $stdout) ⇒ Object



16
17
18
19
20
21
22
23
24
# File 'lib/gitdig/commands/pr/team.rb', line 16

def execute(input: $stdin, output: $stdout)
  issues = github_client.search_issues(
    search_str,
    sort: 'created', order: 'asc', per_page: 100
  )
  issues.items.each do |i|
    output.puts pr_output(i)
  end
end