Class: CollavreGithub::Tools::GithubPrCommitsService
- Inherits:
-
Object
- Object
- CollavreGithub::Tools::GithubPrCommitsService
- Extended by:
- T::Sig, ToolMeta
- Includes:
- Concerns::GithubClientFinder
- Defined in:
- app/services/collavre_github/tools/github_pr_commits_service.rb
Instance Method Summary collapse
Instance Method Details
#call(creative_id:, repo:, pr_number:) ⇒ Object
25 26 27 28 29 30 31 32 33 34 |
# File 'app/services/collavre_github/tools/github_pr_commits_service.rb', line 25 def call(creative_id:, repo:, pr_number:) with_github_client(creative_id: creative_id, repo: repo, error_context: "fetch PR commits") do |client| = client.(repo, pr_number) { commits: .map.with_index(1) { |msg, i| { index: i, message: msg } }, count: .size } end end |