sashimi_tanpopo 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -2
- data/Dockerfile +1 -1
- data/README.md +19 -3
- data/docs/RECIPE.md +1 -0
- data/lib/sashimi_tanpopo/cli.rb +18 -14
- data/lib/sashimi_tanpopo/diff_helper.rb +17 -0
- data/lib/sashimi_tanpopo/dsl.rb +2 -3
- data/lib/sashimi_tanpopo/provider/github.rb +52 -1
- data/lib/sashimi_tanpopo/version.rb +1 -1
- data/lib/sashimi_tanpopo.rb +1 -0
- data/rbs_collection.lock.yaml +30 -14
- data/sig/sashimi_tanpopo/diff_helper.rbs +5 -0
- data/sig/sashimi_tanpopo/dsl.rbs +1 -1
- data/sig/sashimi_tanpopo/provider/github.rbs +6 -0
- metadata +3 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4cb5f08e4ea1b3f4a7dea92a3fc242ce77894fe0d6d610a48aab10e5b4bc3f99
|
|
4
|
+
data.tar.gz: ef6c01d72528207f0cad5961f894efbc38b885fdd0b425166245ac3c89c8fda4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 99ea3fc4cd53589883c574b56052a2c0147a5f238b698e748edd07330209cbcb84a49aeafbe7930ff9e29bb66f3859428eea9fffea2e719ddb283d7a7f96759b
|
|
7
|
+
data.tar.gz: 259c452fbeb224fa6b2c8a150429c028c6fff5f3d7c45659166d5de4a69ec9b6c058025be147fd75175f0d837b44bc86fc3a47f2dab5a5344be10de4710780e0
|
data/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,17 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
|
-
[full changelog](http://github.com/sue445/sashimi_tanpopo/compare/v0.
|
|
2
|
+
[full changelog](http://github.com/sue445/sashimi_tanpopo/compare/v0.3.0...main)
|
|
3
|
+
|
|
4
|
+
## [0.3.0](https://github.com/sue445/sashimi_tanpopo/releases/tag/v0.3.0) - 2025-10-30
|
|
5
|
+
[full changelog](http://github.com/sue445/sashimi_tanpopo/compare/v0.2.0...v0.3.0)
|
|
6
|
+
|
|
7
|
+
* Support GitHub Actions Job Summary
|
|
8
|
+
* https://github.com/sue445/sashimi_tanpopo/pull/62
|
|
3
9
|
|
|
4
10
|
## [0.2.0](https://github.com/sue445/sashimi_tanpopo/releases/tag/v0.2.0) - 2025-10-22
|
|
5
11
|
[full changelog](http://github.com/sue445/sashimi_tanpopo/compare/v0.1.3...v0.2.0)
|
|
6
12
|
|
|
7
13
|
* Change `--pr-target-branch` and `--mr-target-branch` 's default value to repository's default branch
|
|
8
|
-
* https://github.com/sue445/sashimi_tanpopo/pull/
|
|
14
|
+
* https://github.com/sue445/sashimi_tanpopo/pull/52
|
|
9
15
|
|
|
10
16
|
## [0.1.3](https://github.com/sue445/sashimi_tanpopo/releases/tag/v0.1.3) - 2025-10-19
|
|
11
17
|
[full changelog](http://github.com/sue445/sashimi_tanpopo/compare/v0.1.2...v0.1.3)
|
data/Dockerfile
CHANGED
data/README.md
CHANGED
|
@@ -50,6 +50,8 @@ e.g.
|
|
|
50
50
|
docker run -v /path/to/recipe_dir:/recipes:ro -v $(pwd):/work --rm ghcr.io/sue445/sashimi_tanpopo <local|github|gitlab> <arguments> /recipes/recipe.rb
|
|
51
51
|
```
|
|
52
52
|
|
|
53
|
+
c.f. https://github.com/sue445/sashimi_tanpopo/pkgs/container/sashimi_tanpopo
|
|
54
|
+
|
|
53
55
|
## Usage
|
|
54
56
|
### sashimi_tanpopo local
|
|
55
57
|
Change local files using recipe files
|
|
@@ -70,7 +72,7 @@ Options:
|
|
|
70
72
|
```
|
|
71
73
|
|
|
72
74
|
### sashimi_tanpopo github
|
|
73
|
-
Change local files using recipe files and create Pull Request
|
|
75
|
+
Change local files using recipe files and create Pull Request on GitHub
|
|
74
76
|
|
|
75
77
|
```bash
|
|
76
78
|
$ sashimi_tanpopo help github
|
|
@@ -92,6 +94,7 @@ Options:
|
|
|
92
94
|
[--github-api-url=GITHUB_API_URL] # GitHub API endpoint. One of --github-api-url or $GITHUB_API_URL is required [$GITHUB_API_URL]
|
|
93
95
|
# Default: https://api.github.com
|
|
94
96
|
[--github-token=GITHUB_TOKEN] # GitHub access token. One of --github-token or $GITHUB_TOKEN is required [$GITHUB_TOKEN]
|
|
97
|
+
[--github-step-summary=GITHUB_STEP_SUMMARY] # Path to GitHub step summary file [$GITHUB_STEP_SUMMARY]
|
|
95
98
|
--pr-title=PR_TITLE # Pull Request title
|
|
96
99
|
[--pr-body=PR_BODY] # Pull Request body
|
|
97
100
|
--pr-source-branch=pr_branch # Pull Request source branch (a.k.a. head branch)
|
|
@@ -112,7 +115,9 @@ Options:
|
|
|
112
115
|
* Only if you want to change `.github/workflows/*.yml`
|
|
113
116
|
|
|
114
117
|
### sashimi_tanpopo gitlab
|
|
115
|
-
Change local files using recipe files and create Merge Request
|
|
118
|
+
Change local files using recipe files and create Merge Request on [GitLab™](https://about.gitlab.com/)
|
|
119
|
+
|
|
120
|
+
_GITLAB is a trademark of GitLab Inc. in the United States and other countries and regions_
|
|
116
121
|
|
|
117
122
|
```bash
|
|
118
123
|
$ sashimi_tanpopo help gitlab
|
|
@@ -157,7 +162,18 @@ See [docs/RECIPE.md](docs/RECIPE.md)
|
|
|
157
162
|
|
|
158
163
|
## Use on CI services
|
|
159
164
|
### GitHub Actions
|
|
160
|
-
https://github.com/marketplace/actions/sashimi_tanpopo_action
|
|
165
|
+
See https://github.com/marketplace/actions/sashimi_tanpopo_action
|
|
166
|
+
|
|
167
|
+
### GitLab CI
|
|
168
|
+
See https://gitlab.com/explore/catalog/sue445/sashimi_tanpopo-components
|
|
169
|
+
|
|
170
|
+
## Real example
|
|
171
|
+
sashimi_tanpopo is used to manage configuration files for my multiple personal repositories.
|
|
172
|
+
|
|
173
|
+
See followings.
|
|
174
|
+
|
|
175
|
+
* https://github.com/sue445/sashimi_tanpopo-personal
|
|
176
|
+
* https://gitlab.com/sue445/sashimi_tanpopo-personal-gitlab
|
|
161
177
|
|
|
162
178
|
## Development
|
|
163
179
|
|
data/docs/RECIPE.md
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Recipe file is simple Ruby script, with some exceptions.
|
|
3
3
|
|
|
4
4
|
By avoiding the DSL methods listed below, you are free to write code as you like.
|
|
5
|
+
(e.g. write your cool code, define variables, require other files)
|
|
5
6
|
|
|
6
7
|
## Special methods available within recipe file
|
|
7
8
|
The following methods are special variables available within recipe file.
|
data/lib/sashimi_tanpopo/cli.rb
CHANGED
|
@@ -35,25 +35,28 @@ module SashimiTanpopo
|
|
|
35
35
|
|
|
36
36
|
desc "github RECIPE [RECIPE...]", "Change local files using recipe files and create Pull Request"
|
|
37
37
|
define_exec_common_options
|
|
38
|
-
option :git_user_name,
|
|
39
|
-
option :git_email,
|
|
40
|
-
option :message,
|
|
41
|
-
option :github_repository,
|
|
42
|
-
option :github_api_url,
|
|
43
|
-
option :github_token,
|
|
44
|
-
option :
|
|
45
|
-
option :
|
|
46
|
-
option :
|
|
47
|
-
option :
|
|
48
|
-
option :
|
|
49
|
-
option :
|
|
50
|
-
option :
|
|
51
|
-
option :
|
|
38
|
+
option :git_user_name, type: :string, desc: "user name for git commit. Default: username of user authenticated with token"
|
|
39
|
+
option :git_email, type: :string, desc: "email for git commit. Default: <git_user_name>@users.noreply.<github_host>"
|
|
40
|
+
option :message, type: :string, desc: "commit message", required: true, aliases: "-m", banner: "COMMIT_MESSAGE"
|
|
41
|
+
option :github_repository, type: :string, desc: "GitHub repository for Pull Request. One of --github--repository or $GITHUB_REPOSITORY is required [$GITHUB_REPOSITORY]", banner: "user/repo"
|
|
42
|
+
option :github_api_url, type: :string, desc: "GitHub API endpoint. One of --github-api-url or $GITHUB_API_URL is required [$GITHUB_API_URL]", default: "https://api.github.com"
|
|
43
|
+
option :github_token, type: :string, desc: "GitHub access token. One of --github-token or $GITHUB_TOKEN is required [$GITHUB_TOKEN]"
|
|
44
|
+
option :github_step_summary, type: :string, desc: "Path to GitHub step summary file [$GITHUB_STEP_SUMMARY]"
|
|
45
|
+
option :pr_title, type: :string, desc: "Pull Request title", required: true
|
|
46
|
+
option :pr_body, type: :string, desc: "Pull Request body"
|
|
47
|
+
option :pr_source_branch, type: :string, desc: "Pull Request source branch (a.k.a. head branch)", required: true, banner: "pr_branch"
|
|
48
|
+
option :pr_target_branch, type: :string, desc: "Pull Request target branch (a.k.a. base branch). Default: default branch of repository (e.g. main, master)", banner: "main"
|
|
49
|
+
option :pr_assignees, type: :array, desc: "Pull Request assignees", default: []
|
|
50
|
+
option :pr_reviewers, type: :array, desc: "Pull Request reviewers", default: []
|
|
51
|
+
option :pr_labels, type: :array, desc: "Pull Request labels", default: []
|
|
52
|
+
option :pr_draft, type: :boolean, desc: "Whether to create draft Pull Request", default: false
|
|
52
53
|
def github(*recipe_files)
|
|
53
54
|
repository = option_or_env!(option_name: :github_repository, env_name: "GITHUB_REPOSITORY")
|
|
54
55
|
api_endpoint = option_or_env!(option_name: :github_api_url, env_name: "GITHUB_API_URL")
|
|
55
56
|
access_token = option_or_env!(option_name: :github_token, env_name: "GITHUB_TOKEN")
|
|
56
57
|
|
|
58
|
+
summary_path = option_or_env(option_name: :github_step_summary, env_name: "GITHUB_STEP_SUMMARY")
|
|
59
|
+
|
|
57
60
|
Provider::GitHub.new(
|
|
58
61
|
recipe_paths: recipe_files,
|
|
59
62
|
target_dir: options[:target_dir],
|
|
@@ -74,6 +77,7 @@ module SashimiTanpopo
|
|
|
74
77
|
pr_reviewers: options[:pr_reviewers],
|
|
75
78
|
pr_labels: options[:pr_labels],
|
|
76
79
|
is_draft_pr: options[:pr_draft],
|
|
80
|
+
summary_path: summary_path,
|
|
77
81
|
).perform
|
|
78
82
|
end
|
|
79
83
|
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module SashimiTanpopo
|
|
4
|
+
module DiffHelper
|
|
5
|
+
# Generate diff between 2 strings
|
|
6
|
+
#
|
|
7
|
+
# @param str1 [String]
|
|
8
|
+
# @param str2 [String]
|
|
9
|
+
# @param is_colored [Boolean]
|
|
10
|
+
#
|
|
11
|
+
# @return [String]
|
|
12
|
+
def self.generate_diff(str1, str2, is_colored:)
|
|
13
|
+
format = is_colored ? :color : :text
|
|
14
|
+
Diffy::Diff.new(str1, str2, context: 3).to_s(format)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
data/lib/sashimi_tanpopo/dsl.rb
CHANGED
|
@@ -70,8 +70,7 @@ module SashimiTanpopo
|
|
|
70
70
|
@__dry_run__ = dry_run
|
|
71
71
|
@__target_dir__ = target_dir
|
|
72
72
|
@__is_update_local__ = is_update_local
|
|
73
|
-
|
|
74
|
-
@__diffy_format__ = is_colored ? :color : :text
|
|
73
|
+
@__is_colored__ = is_colored
|
|
75
74
|
end
|
|
76
75
|
|
|
77
76
|
# passed from `--params`
|
|
@@ -177,7 +176,7 @@ module SashimiTanpopo
|
|
|
177
176
|
# @param str1 [String]
|
|
178
177
|
# @param str2 [String]
|
|
179
178
|
def show_diff(str1, str2)
|
|
180
|
-
diff_text =
|
|
179
|
+
diff_text = DiffHelper.generate_diff(str1, str2, is_colored: @__is_colored__)
|
|
181
180
|
|
|
182
181
|
SashimiTanpopo.logger.info "diff:"
|
|
183
182
|
|
|
@@ -27,11 +27,13 @@ module SashimiTanpopo
|
|
|
27
27
|
# @param pr_reviewers [Array<String>]
|
|
28
28
|
# @param pr_labels [Array<String>]
|
|
29
29
|
# @param is_draft_pr [Boolean] Whether create draft Pull Request
|
|
30
|
+
# @param summary_path [String,nil]
|
|
30
31
|
def initialize(recipe_paths:, target_dir:, params:, dry_run:, is_colored:,
|
|
31
32
|
git_username:, git_email:, commit_message:,
|
|
32
33
|
repository:, access_token:, api_endpoint: DEFAULT_API_ENDPOINT,
|
|
33
34
|
pr_title:, pr_body:, pr_source_branch:, pr_target_branch:,
|
|
34
|
-
pr_assignees: [], pr_reviewers: [], pr_labels: [], is_draft_pr
|
|
35
|
+
pr_assignees: [], pr_reviewers: [], pr_labels: [], is_draft_pr:,
|
|
36
|
+
summary_path:)
|
|
35
37
|
super(
|
|
36
38
|
recipe_paths: recipe_paths,
|
|
37
39
|
target_dir: target_dir,
|
|
@@ -54,6 +56,7 @@ module SashimiTanpopo
|
|
|
54
56
|
@git_username = git_username
|
|
55
57
|
@git_email = git_email
|
|
56
58
|
@api_endpoint = api_endpoint
|
|
59
|
+
@summary_path = summary_path || ""
|
|
57
60
|
|
|
58
61
|
@client = Octokit::Client.new(api_endpoint: api_endpoint, access_token: access_token)
|
|
59
62
|
end
|
|
@@ -65,6 +68,8 @@ module SashimiTanpopo
|
|
|
65
68
|
def perform
|
|
66
69
|
changed_files = apply_recipe_files
|
|
67
70
|
|
|
71
|
+
write_summary_file(changed_files)
|
|
72
|
+
|
|
68
73
|
return nil if changed_files.empty? || @dry_run
|
|
69
74
|
|
|
70
75
|
if exists_branch?(@pr_source_branch)
|
|
@@ -97,6 +102,36 @@ module SashimiTanpopo
|
|
|
97
102
|
DEFAULT_GITHUB_HOST
|
|
98
103
|
end
|
|
99
104
|
|
|
105
|
+
# @param changed_files [Hash<String, { before_content: String, after_content: String, mode: String }>] key: f path, value: Hash
|
|
106
|
+
# @param dry_run [Boolean]
|
|
107
|
+
#
|
|
108
|
+
# @return [String]
|
|
109
|
+
def self.generate_summary(changed_files:, dry_run:)
|
|
110
|
+
header = +"## :page_facing_up: sashimi_tanpopo report"
|
|
111
|
+
header << " (dry run)" if dry_run
|
|
112
|
+
|
|
113
|
+
lines = [header]
|
|
114
|
+
|
|
115
|
+
if changed_files.empty?
|
|
116
|
+
lines.push(
|
|
117
|
+
"no changes",
|
|
118
|
+
"",
|
|
119
|
+
)
|
|
120
|
+
else
|
|
121
|
+
changed_files.each do |path, data|
|
|
122
|
+
lines.push(
|
|
123
|
+
"### :memo: #{path}",
|
|
124
|
+
"```diff",
|
|
125
|
+
SashimiTanpopo::DiffHelper.generate_diff(data[:before_content], data[:after_content], is_colored: false).rstrip,
|
|
126
|
+
"```",
|
|
127
|
+
"",
|
|
128
|
+
)
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
lines.join("\n")
|
|
133
|
+
end
|
|
134
|
+
|
|
100
135
|
private
|
|
101
136
|
|
|
102
137
|
# @return [String]
|
|
@@ -129,6 +164,22 @@ module SashimiTanpopo
|
|
|
129
164
|
res[:default_branch]
|
|
130
165
|
end
|
|
131
166
|
|
|
167
|
+
# @param changed_files [Hash<String, { before_content: String, after_content: String, mode: String }>] key: f path, value: Hash
|
|
168
|
+
def write_summary_file(changed_files)
|
|
169
|
+
return if @summary_path.empty?
|
|
170
|
+
|
|
171
|
+
unless File.exist?(@summary_path)
|
|
172
|
+
SashimiTanpopo.logger.warn "#{@summary_path} does not exist"
|
|
173
|
+
return
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
summary = self.class.generate_summary(changed_files: changed_files, dry_run: @dry_run)
|
|
177
|
+
|
|
178
|
+
File.open(@summary_path, "a") do |f|
|
|
179
|
+
f.write(summary)
|
|
180
|
+
end
|
|
181
|
+
end
|
|
182
|
+
|
|
132
183
|
# Whether exists branch on repository
|
|
133
184
|
#
|
|
134
185
|
# @param branch [String]
|
data/lib/sashimi_tanpopo.rb
CHANGED
|
@@ -10,6 +10,7 @@ require_relative "sashimi_tanpopo/version"
|
|
|
10
10
|
require_relative "sashimi_tanpopo/dsl"
|
|
11
11
|
require_relative "sashimi_tanpopo/logger"
|
|
12
12
|
require_relative "sashimi_tanpopo/provider"
|
|
13
|
+
require_relative "sashimi_tanpopo/diff_helper"
|
|
13
14
|
|
|
14
15
|
module SashimiTanpopo
|
|
15
16
|
class Error < StandardError; end
|
data/rbs_collection.lock.yaml
CHANGED
|
@@ -6,7 +6,7 @@ gems:
|
|
|
6
6
|
source:
|
|
7
7
|
type: git
|
|
8
8
|
name: ruby/gem_rbs_collection
|
|
9
|
-
revision:
|
|
9
|
+
revision: 533a74999571ba71d84cbbb3ef47ba34de526a12
|
|
10
10
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
11
11
|
repo_dir: gems
|
|
12
12
|
- name: base64
|
|
@@ -14,7 +14,7 @@ gems:
|
|
|
14
14
|
source:
|
|
15
15
|
type: git
|
|
16
16
|
name: ruby/gem_rbs_collection
|
|
17
|
-
revision:
|
|
17
|
+
revision: 533a74999571ba71d84cbbb3ef47ba34de526a12
|
|
18
18
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
19
19
|
repo_dir: gems
|
|
20
20
|
- name: bigdecimal
|
|
@@ -22,7 +22,7 @@ gems:
|
|
|
22
22
|
source:
|
|
23
23
|
type: git
|
|
24
24
|
name: ruby/gem_rbs_collection
|
|
25
|
-
revision:
|
|
25
|
+
revision: 533a74999571ba71d84cbbb3ef47ba34de526a12
|
|
26
26
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
27
27
|
repo_dir: gems
|
|
28
28
|
- name: csv
|
|
@@ -30,7 +30,7 @@ gems:
|
|
|
30
30
|
source:
|
|
31
31
|
type: git
|
|
32
32
|
name: ruby/gem_rbs_collection
|
|
33
|
-
revision:
|
|
33
|
+
revision: 533a74999571ba71d84cbbb3ef47ba34de526a12
|
|
34
34
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
35
35
|
repo_dir: gems
|
|
36
36
|
- name: date
|
|
@@ -46,7 +46,15 @@ gems:
|
|
|
46
46
|
source:
|
|
47
47
|
type: git
|
|
48
48
|
name: ruby/gem_rbs_collection
|
|
49
|
-
revision:
|
|
49
|
+
revision: 533a74999571ba71d84cbbb3ef47ba34de526a12
|
|
50
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
51
|
+
repo_dir: gems
|
|
52
|
+
- name: diffy
|
|
53
|
+
version: '3.4'
|
|
54
|
+
source:
|
|
55
|
+
type: git
|
|
56
|
+
name: ruby/gem_rbs_collection
|
|
57
|
+
revision: 533a74999571ba71d84cbbb3ef47ba34de526a12
|
|
50
58
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
51
59
|
repo_dir: gems
|
|
52
60
|
- name: erb
|
|
@@ -58,7 +66,7 @@ gems:
|
|
|
58
66
|
source:
|
|
59
67
|
type: git
|
|
60
68
|
name: ruby/gem_rbs_collection
|
|
61
|
-
revision:
|
|
69
|
+
revision: 533a74999571ba71d84cbbb3ef47ba34de526a12
|
|
62
70
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
63
71
|
repo_dir: gems
|
|
64
72
|
- name: fileutils
|
|
@@ -69,12 +77,20 @@ gems:
|
|
|
69
77
|
version: '0'
|
|
70
78
|
source:
|
|
71
79
|
type: stdlib
|
|
80
|
+
- name: gitlab
|
|
81
|
+
version: '6.0'
|
|
82
|
+
source:
|
|
83
|
+
type: git
|
|
84
|
+
name: ruby/gem_rbs_collection
|
|
85
|
+
revision: 533a74999571ba71d84cbbb3ef47ba34de526a12
|
|
86
|
+
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
87
|
+
repo_dir: gems
|
|
72
88
|
- name: hashdiff
|
|
73
89
|
version: '1.1'
|
|
74
90
|
source:
|
|
75
91
|
type: git
|
|
76
92
|
name: ruby/gem_rbs_collection
|
|
77
|
-
revision:
|
|
93
|
+
revision: 533a74999571ba71d84cbbb3ef47ba34de526a12
|
|
78
94
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
79
95
|
repo_dir: gems
|
|
80
96
|
- name: httparty
|
|
@@ -82,7 +98,7 @@ gems:
|
|
|
82
98
|
source:
|
|
83
99
|
type: git
|
|
84
100
|
name: ruby/gem_rbs_collection
|
|
85
|
-
revision:
|
|
101
|
+
revision: 533a74999571ba71d84cbbb3ef47ba34de526a12
|
|
86
102
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
87
103
|
repo_dir: gems
|
|
88
104
|
- name: io-console
|
|
@@ -102,7 +118,7 @@ gems:
|
|
|
102
118
|
source:
|
|
103
119
|
type: git
|
|
104
120
|
name: ruby/gem_rbs_collection
|
|
105
|
-
revision:
|
|
121
|
+
revision: 533a74999571ba71d84cbbb3ef47ba34de526a12
|
|
106
122
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
107
123
|
repo_dir: gems
|
|
108
124
|
- name: monitor
|
|
@@ -122,7 +138,7 @@ gems:
|
|
|
122
138
|
source:
|
|
123
139
|
type: git
|
|
124
140
|
name: ruby/gem_rbs_collection
|
|
125
|
-
revision:
|
|
141
|
+
revision: 533a74999571ba71d84cbbb3ef47ba34de526a12
|
|
126
142
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
127
143
|
repo_dir: gems
|
|
128
144
|
- name: parallel
|
|
@@ -130,7 +146,7 @@ gems:
|
|
|
130
146
|
source:
|
|
131
147
|
type: git
|
|
132
148
|
name: ruby/gem_rbs_collection
|
|
133
|
-
revision:
|
|
149
|
+
revision: 533a74999571ba71d84cbbb3ef47ba34de526a12
|
|
134
150
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
135
151
|
repo_dir: gems
|
|
136
152
|
- name: pp
|
|
@@ -154,7 +170,7 @@ gems:
|
|
|
154
170
|
source:
|
|
155
171
|
type: git
|
|
156
172
|
name: ruby/gem_rbs_collection
|
|
157
|
-
revision:
|
|
173
|
+
revision: 533a74999571ba71d84cbbb3ef47ba34de526a12
|
|
158
174
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
159
175
|
repo_dir: gems
|
|
160
176
|
- name: rdoc
|
|
@@ -170,7 +186,7 @@ gems:
|
|
|
170
186
|
source:
|
|
171
187
|
type: git
|
|
172
188
|
name: ruby/gem_rbs_collection
|
|
173
|
-
revision:
|
|
189
|
+
revision: 533a74999571ba71d84cbbb3ef47ba34de526a12
|
|
174
190
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
175
191
|
repo_dir: gems
|
|
176
192
|
- name: timeout
|
|
@@ -190,7 +206,7 @@ gems:
|
|
|
190
206
|
source:
|
|
191
207
|
type: git
|
|
192
208
|
name: ruby/gem_rbs_collection
|
|
193
|
-
revision:
|
|
209
|
+
revision: 533a74999571ba71d84cbbb3ef47ba34de526a12
|
|
194
210
|
remote: https://github.com/ruby/gem_rbs_collection.git
|
|
195
211
|
repo_dir: gems
|
|
196
212
|
gemfile_lock_path: Gemfile.lock
|
data/sig/sashimi_tanpopo/dsl.rbs
CHANGED
|
@@ -18,6 +18,7 @@ module SashimiTanpopo
|
|
|
18
18
|
@client: Octokit::Client
|
|
19
19
|
@is_draft_pr: bool
|
|
20
20
|
@api_endpoint: String
|
|
21
|
+
@summary_path: String
|
|
21
22
|
|
|
22
23
|
def initialize: (
|
|
23
24
|
recipe_paths: Array[String],
|
|
@@ -39,12 +40,15 @@ module SashimiTanpopo
|
|
|
39
40
|
?pr_reviewers: Array[String],
|
|
40
41
|
?pr_labels: Array[String],
|
|
41
42
|
is_draft_pr: bool,
|
|
43
|
+
summary_path: String?
|
|
42
44
|
) -> void
|
|
43
45
|
|
|
44
46
|
def perform: () -> String?
|
|
45
47
|
|
|
46
48
|
def self.github_host: (String api_endpoint) -> String
|
|
47
49
|
|
|
50
|
+
def self.generate_summary: (changed_files: changed_files, dry_run: bool) -> String
|
|
51
|
+
|
|
48
52
|
private
|
|
49
53
|
|
|
50
54
|
def pr_target_branch: () -> String
|
|
@@ -57,6 +61,8 @@ module SashimiTanpopo
|
|
|
57
61
|
|
|
58
62
|
def get_default_branch: () -> String
|
|
59
63
|
|
|
64
|
+
def write_summary_file: (changed_files changed_files) -> void
|
|
65
|
+
|
|
60
66
|
def exists_branch?: (String branch) -> bool
|
|
61
67
|
|
|
62
68
|
def create_branch_and_push_changes: (changed_files changed_files) -> void
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sashimi_tanpopo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- sue445
|
|
@@ -261,6 +261,7 @@ files:
|
|
|
261
261
|
- exe/sashimi_tanpopo
|
|
262
262
|
- lib/sashimi_tanpopo.rb
|
|
263
263
|
- lib/sashimi_tanpopo/cli.rb
|
|
264
|
+
- lib/sashimi_tanpopo/diff_helper.rb
|
|
264
265
|
- lib/sashimi_tanpopo/dsl.rb
|
|
265
266
|
- lib/sashimi_tanpopo/logger.rb
|
|
266
267
|
- lib/sashimi_tanpopo/provider.rb
|
|
@@ -273,6 +274,7 @@ files:
|
|
|
273
274
|
- rbs_collection.yaml
|
|
274
275
|
- sig/sashimi_tanpopo.rbs
|
|
275
276
|
- sig/sashimi_tanpopo/cli.rbs
|
|
277
|
+
- sig/sashimi_tanpopo/diff_helper.rbs
|
|
276
278
|
- sig/sashimi_tanpopo/dsl.rbs
|
|
277
279
|
- sig/sashimi_tanpopo/logger.rbs
|
|
278
280
|
- sig/sashimi_tanpopo/provider/base.rbs
|