From ffcf0c2d37f66915e6c8a2077e0714dde41c9129 Mon Sep 17 00:00:00 2001 From: Umekawa Date: Tue, 7 Oct 2025 18:39:38 +0900 Subject: [PATCH 1/4] Add dependency simplecov_json_formatter for development --- ruboty-github.gemspec | 1 + 1 file changed, 1 insertion(+) diff --git a/ruboty-github.gemspec b/ruboty-github.gemspec index 0194259..9715342 100644 --- a/ruboty-github.gemspec +++ b/ruboty-github.gemspec @@ -28,6 +28,7 @@ Gem::Specification.new do |spec| spec.add_development_dependency 'rubocop-rake' spec.add_development_dependency 'rubocop-rspec' spec.add_development_dependency 'simplecov' + spec.add_development_dependency 'simplecov_json_formatter' spec.add_development_dependency 'webmock' spec.metadata['rubygems_mfa_required'] = 'true' end From c1c0b17146b833580907c9209028e90eee1febdf Mon Sep 17 00:00:00 2001 From: Umekawa Date: Tue, 7 Oct 2025 18:40:55 +0900 Subject: [PATCH 2/4] Change coverage output format to json --- spec/spec_helper.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index c96367a..b718404 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,7 +1,16 @@ # frozen_string_literal: true require 'simplecov' -SimpleCov.start +require 'simplecov_json_formatter' + +SimpleCov.start do + SimpleCov.formatters = [ + SimpleCov::Formatter::JSONFormatter, + SimpleCov::Formatter::HTMLFormatter + ] + + add_filter '/spec/' +end require 'ruboty/github' require 'webmock/rspec' From a08ba6a63b7eb22871142692332d673f048fa949 Mon Sep 17 00:00:00 2001 From: Umekawa Date: Tue, 7 Oct 2025 18:41:11 +0900 Subject: [PATCH 3/4] Add qlty coverage action --- .github/workflows/test.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 87d4574..9017e96 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -35,3 +35,18 @@ jobs: ruby-version: "3.2" bundler-cache: true - run: bundle exec rubocop + + qlty: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 + - uses: ruby/setup-ruby@13e7a03dc3ac6c3798f4570bfead2aed4d96abfb # v1.244.0 + with: + ruby-version: '3.2' + bundler-cache: true + - name: Test + run: bundle exec rspec + - uses: qltysh/qlty-action/coverage@a19242102d17e497f437d7466aa01b528537e899 # v2.2.0 + with: + token: ${{ secrets.QLTY_COVERAGE_TOKEN }} + files: ./coverage/coverage.json From fefed12b75b8b640646b65c21f4750423e7387e6 Mon Sep 17 00:00:00 2001 From: Umekawa Date: Tue, 7 Oct 2025 18:41:21 +0900 Subject: [PATCH 4/4] Add qlty badge to README --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 84ed99d..9220f0e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ # Ruboty::Github -[![Gem Version](https://badge.fury.io/rb/ruboty-qiita-github.svg)](https://badge.fury.io/rb/ruboty-qiita-github) [![Test](https://github.com/increments/ruboty-qiita-github/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/increments/ruboty-qiita-github/actions/workflows/test.yml) +[![Gem Version](https://badge.fury.io/rb/ruboty-qiita-github.svg)](https://badge.fury.io/rb/ruboty-qiita-github) +[![Test](https://github.com/increments/ruboty-qiita-github/actions/workflows/test.yml/badge.svg?branch=master)](https://github.com/increments/ruboty-qiita-github/actions/workflows/test.yml) +[![Maintainability](https://qlty.sh/gh/increments/projects/ruboty-qiita-github/maintainability.svg)](https://qlty.sh/gh/increments/projects/ruboty-qiita-github) +[![Code Coverage](https://qlty.sh/gh/increments/projects/ruboty-qiita-github/coverage.svg)](https://qlty.sh/gh/increments/projects/ruboty-qiita-github) Manage GitHub via Ruboty. This gem adds `deploy pull request` command to original ruboty-github plugin.